x
 
<!DOCTYPE html>
<html>
<head>
<style>
[class|=top] {
  background: yellow;
}
</style>
</head>
<body>
<h1>[attribute|=value] 选择器实例</h1>
<p>带有 class 属性值为 "top" 或 "top-" 的元素会被设置为黄色背景:</p>
<h1 class="top-header">Welcome</h1>
<p class="top-text">Hello world!</p>
<p class="topcontent">Are you learning CSS?</p>
</body>
</html>