总结4.17

*{

    background-color: burlywood;/*通配符选择器,与body选择器类似*/

}

div,p{

    font-size: 15px;/*选择器分组*/

}

div p{

    color: blue;/*后代选择器*/

}

div>p{

    font-style: italic;/*子选择器*/

}

div+p{

    font-size: 25px;/*相邻兄弟选择器,这种选择器只影响div标签后第一个p标签的内容*/

}

span::before{

    content: 'before';/*在span标签内容的前部插入元素*/

}

span::after{

    content: 'after';/*在span标签内容的后部插入元素*/

}

<style type="text/css">

        div{ 200px;height: 50px;}

        a{text-decoration: none; font-size: 20px;}

        a:link{color: red;}/*定义元素未访问时的样式*/

        a:visited{color: blue;} /*定义元素访问后的样式*/

        a:hover{color: orange;}/*定义鼠标经过元素时的样式*/

        a:active{color: green; text-decoration: underline;}/*定义鼠标 点击元素时的样式*/

</style>

#table{

     500px;

    table-layout: fixed;/*固定表格按照css规定的样式来执行*/

}

table td{

    overflow-x: scroll;/*单元格内元素超出范围用滚动条显示*/

}

原文地址:https://www.cnblogs.com/HighKK/p/12722149.html