zoukankan      html  css  js  c++  java
  • CSS特殊性值

     1 <!DOCTYPE html>
     2 <html lang="en">
     3 <head>
     4     <meta charset="UTF-8">
     5     <title>Document</title>
     6 
     7     <style>
     8         h1 { color: red; } /* 0, 0, 0, 1*/
     9         body h1 { color: green; } /* 0, 0, 0, 2*/
    10 
    11         h2 { color: red; } /* 0, 0, 0, 1*/
    12         h2.test{ color: green; } /* 0, 0, 1, 1*/
    13         #test2 { color: yellow; } /* 0, 1, 0, 0*/
    14         h2 { color: gray !important; }
    15         h2 { color: black !important; } 
    16 
    17         /* style 特殊性值为: 1, 0, 0, 0*/
    18         /* id 特殊性值为: 0, 1, 0, 0*/
    19         /* 属性、属性值或者伪类特殊性值为: 0, 0, 1, 0*/
    20         /* 元素特殊性值为: 0, 0, 0, 1*/
    21         /* !important超越特殊性值*/
    22         /* 相同特殊性值,或者!important,最后出现的起作用*/
    23     </style>
    24 </head>
    25 <body>
    26     <h1>12345</h1>
    27     <h2 class="test" id="test2" style="color: blue">67890</h2>
    28 </body>
    29 </html>

  • 相关阅读:
    HTML_表单
    jabc_DAO
    JDBC 加钱减钱
    JDBC 连接池
    JDBC
    视图序列索引
    【Java8】 lambda 特性讲解
    IntelliJ IDEA 常用快捷键
    Java IO 之 装饰模式
    Java IO 讲解
  • 原文地址:https://www.cnblogs.com/maduar/p/5747067.html
Copyright © 2011-2022 走看看