前端一HTML:十四: important
生活随笔
收集整理的這篇文章主要介紹了
前端一HTML:十四: important
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?一個選擇器可以作用于很多個標簽上,
?一個標簽也會被很多個選擇器作用.
??!important 屬性不能被繼承
? ? ? ? ? 作用: 將對應選擇器的優先級設置為最高級
<!doctype html> <html lang="en"> <head><meta charset="UTF-8"><title>Document</title><style type="text/css">#one{color: pink;}.one{font-style: italic;color:blue;}div{font-size: 30px ;color:red !important; }body{color: yellow ;}* {color: purple ;}</style> </head> <body> haha<div class="father"><div class="one" id="one">abc</div></div> </body> </html>?
總結
以上是生活随笔為你收集整理的前端一HTML:十四: important的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: const char * 、char c
- 下一篇: 前端一HTML:十五: 权重的比较