css同时满足两个类名才有效果的写法

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<style type="text/css">
    .item-1.red{color: red;}
</style>
</head>
<body>
    <h1 class="item-1 red">1</h1>
    <h1 class="item-2">2</h1>
</body>
</html>

 

posted @ 2017-10-17 18:32    阅读(19036)  评论(1编辑  收藏  举报