css3動(dòng)畫
問題描述
我想讓他的border在2s內(nèi)閃動(dòng)2種顏色沒反映,這要怎么寫?
<!DOCTYPE html><html lang='en'> <head><meta charset='utf-8'><meta name='description' content='Creating Modal Window with Twitter Bootstrap'> </head> <style> @keyframes borderbg { 0% {border: 1px solid red !important;} 25% {border: 1px solid #c0ccda !important;} 50% {border: 1px solid red !important;} 100% {border: 1px solid #c0ccda !important;}}@-moz-keyframes borderbg { 0% {border: 1px solid red !important;} 25% {border: 1px solid #c0ccda !important;} 50% {border: 1px solid red !important;} 100% {border: 1px solid #c0ccda !important;}}@-webkit-keyframes borderbg { 0% {border: 1px solid red !important;} 25% {border: 1px solid #c0ccda !important;} 50% {border: 1px solid red !important;} 100% {border: 1px solid #c0ccda !important;}}@-o-keyframes borderbg { 0% {border: 1px solid red !important;} 25% {border: 1px solid #c0ccda !important;} 50% {border: 1px solid red !important;} 100% {border: 1px solid #c0ccda !important;}}.cl-Input p{ width: 200px; height: 200px; border:1px solid #ccc; animation: borderbg 2s; -moz-animation: borderbg 2s; -webkit-animation: borderbg 2s; -o-animation: borderbg 2s; margin: 20px;}</style> <body><p class='cl-Input'> <p class='el-input__inner'> </p> <p class='el-textarea__inner'> </p> <p class='note-frame'> </p></p> </body> <script> </script></html>
問題解答
回答1:你后面加了!important,顏色就不會(huì)變了。去了試試
回答2:去掉!important就可以了。加這么多!important是做什么?沒看懂~!important一般不建議使用的吧~
相關(guān)文章:
1. 關(guān)于docker下的nginx壓力測(cè)試2. javascript - webpack熱加載配置不生效3. debian - docker依賴的aufs-tools源碼哪里可以找到啊?4. 為什么我ping不通我的docker容器呢???5. angular.js - angular內(nèi)容過長(zhǎng)展開收起效果6. php - 一個(gè)操作請(qǐng)求多個(gè)服務(wù)如何保證數(shù)據(jù)的安全?7. javascript - js代碼獲取驗(yàn)證碼倒計(jì)時(shí)問題8. 主從備份 - 跪求mysql 高可用主從方案9. docker start -a dockername 老是卡住,什么情況?10. dockerfile - [docker build image失敗- npm install]
