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. javascript - 微信小程序里怎么把頁面轉(zhuǎn)成圖片分享2. python - flask_Bootstrap的WTF的調(diào)用疑問3. python小白,問一個(gè)關(guān)于可變類型和不可變類型底層的問題4. python把第x列數(shù)據(jù)寫入第x個(gè)文件5. python3.x - Python中出現(xiàn)AttributeError: object has no attribute6. mysql - 我用SQL語句 更新 行的時(shí)候,發(fā)現(xiàn)全部 中文都被清空了,請(qǐng)問怎么解決?7. mysql - SQL問個(gè)基礎(chǔ)例子,書上的,我怎么看都看不懂..誰幫我解釋一下第2個(gè)為什么和第1個(gè)一樣?8. 數(shù)據(jù)庫 - mysql boolean型無法插入true9. python 多進(jìn)程 或者 多線程下如何高效的同步數(shù)據(jù)?10. mysql服務(wù)無法啟動(dòng)1067錯(cuò)誤,誰知道正確的解決方法?
