zoukankan      html  css  js  c++  java
  • 选择器高级,from提交方式

    from提交方式

    前台向服务器请求数据时,需要向后台提交请求数据,提交的方式有两种,get和post两种方式。

    两者之间有很大的区别;get 提交数据非常快,效率高但是数据不安全。post提交数据的效率不高但是安全性比较高。

    选择器高级

    高级选择器就是基础选择器的组合。

    1 群组选择器:可以同时定义不同标签的相同属性,

        <div class="div1 aa">15461</div>
        <div class="div2 bb">45451</div>
        <div class=" div3 cc">464600</div>
        <div class="div4 dd">56484</div>
        <div class="div5 ee">489745</div>
    <style>
       .aa,.bb,.cc,.dd,.ee {
            20px;
           height: 50px;
           background-color: red;
       }
    </style>

    这里是统一对五个标签的高度宽度,背景颜色进行设置

    后代选择器:控制的一个标签通过父标签准确的定位到我们想要设置的子标签。

    body .div2 .p2 {  /*后代 空格,父子(孙)*/
        color: orange;
    }
    .div2 > div > .p2 {  /*子代 >,父子*/
        color: pink;
    }

    3 兄弟选择器:有两者实现方式,1 中间使用波浪号(~)这样连接的两个标签可以不是相邻的两个,但是在所有的选择器中

    被修改的要在下边,因为css是从上而下解释的。第二中方式是中间有一个加号(+)这样连接的两个标签必须是相邻的

    第一种:

    .p3 ~ .i3 {   /*兄弟 ~,可相邻也可不相邻,但必须通过上方修饰下方*/
        color: greenyellow;
    }

    第二种:

    .div3 + .i3 {   /*相邻 +,必须相邻,但必须通过上方修饰下方*/
        color: green;
    }

    高级选择器之间本身没有优先级之分,标签的种类越多的优先级越高,种类相同就比个数,个数相同就比位置,在下边得到起作用

  • 相关阅读:
    hdu 5726 GCD
    codeforces 982C Cut 'em all!
    codeforces 982B Bus of Characters
    codeforces 982A Row
    codeforces 983B XOR-pyramid
    codeforces 979D Kuro and GCD and XOR and SUM
    codeforces 983A Finite or not?
    codeforces 984B Minesweeper
    codeforces 979C Kuro and Walking Route
    codeforces 979B Treasure Hunt
  • 原文地址:https://www.cnblogs.com/1624413646hxy/p/11135172.html
Copyright © 2011-2022 走看看