zoukankan      html  css  js  c++  java
  • CSS选择器的应用整合

     脚本:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <style type="text/css">
        /* 
        
    1. 修改b字体为橙色
    2. 修改s1、s2、div3字体为绿色
    3. 修改提交按钮背景为蓝色
    4. 修改s5背景为黄色
    5. 修改s1、s2、s3背景为黄色
    6. 修改s4和s5字体为蓝色
    7. 修改b、s4和s6背景色为绿色
        
         */
         #h3b{
             color: orange;
         }
         .c1{
             color: red;
         }
         input[type='submit']{
             background-color: green;
         }
         div>div>span{
             background-color: purple;
         }
         body>span{
             background-color: yellow;
         }
         #d1 span{
             color: blue;
         }
         body>div>span,#hb{
             background-color: green;
         }
    </style>
    </head>
    <body>
    <h3>a</h3><h3 id="h3b">b</h3>
    <div>div1</div>
    <div>div2</div>
    <div class="c1">div3</div>
    <span class="c1">s1</span>
    <span class="c1">s2</span>
    <span>s3</span>
    <div id="d1">
        <span>s4</span>
        <div>
            <span>s5</span>
        </div>
    </div>
    <div>
        <span>s6</span>
    </div>
    <input type="button" 
            value="按钮">
    <input type="submit" >
    
    
    </body>
    </html>
    View Code

     页面展示:

    Insert title here

    a

    b

    div1
    div2
    div3

    s1 s2 s3

    s4
    s5
    s6

  • 相关阅读:
    JS写游戏
    为运算表达式设计优先级
    原子的数量
    二叉搜索树的范围和
    所有可能的满二叉树
    有效的井字游戏
    站在对象模型的尖端
    执行期语意学
    构造、析构、拷贝语意学
    [CSP-S模拟测试]:序列(二分答案+树状数组)
  • 原文地址:https://www.cnblogs.com/xingsir/p/12795603.html
Copyright © 2011-2022 走看看