Web速查-索引

并集选择权

定义

并集选择器,找到所有满足的标签

语法

element1,element2,element3,...
{
CSS 样式;
}

实例

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>NTHOME-零基础入门学习Web(HTML5+CSS3)</title>
<style>
.important,#important,.union
{
color:green;
}
</style>
</head>
<body>
<h1 class="important">Welcome to nitian.web3v.vip</h1>
<p id="important">Welcome to nitian.web3v.vip</p>
<p class="important">Welcome to nitian.web3v.vip</p>
<p class="union">Welcome to nitian.web3v.vip</p>
<p>Welcome to nitian.web3v.vip</p>
</body>
</html>

Welcome to nitian.web3v.vip

Welcome to nitian.web3v.vip

Welcome to nitian.web3v.vip

Welcome to nitian.web3v.vip

Welcome to nitian.web3v.vip

浏览器支持

表格中的数字表示支持该属性的第一个浏览器版本号

Safari Chrome FireFox IE
1.0 1.0 1.0 5.0