0420-并集选择器

来源:互联网 发布:每一次想你 网络歌曲 编辑:程序博客网 时间:2024/05/05 06:48
1.什么是并集选择器?作用: 给所有选择器选中的标签设置属性格式:选择器1,选择器2{    属性:;}注意点:1.并集选择器必须使用,来连接2.选择器可以使用标签名称/id名称/class名称
<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>并集选择器</title>    <style>        /*        .ht{            color: red;        }        .para{            color: red;        }        */        .ht,.para{            color: red;        }    </style></head><body><h1 class="ht">我是标题</h1><p class="para">我是段落</p><p>我是段落</p><p>我是段落</p></body></html>
0 0
原创粉丝点击