日期:2014-05-17  浏览次数:20584 次

在HTML对象上应用多个class Name

<!DOCTYPE html>
<html>
<head>
    <title>Applying multiple class names to an object in HTML</title>
    <style type="text/css">
        .sty1 {
            font-size: 2em;
        }
        .sty2 {
            color: #f00;
        }
    </style>
</head>
<body>
 
    <div class="sty1">Big</div>
    <div class="sty2">Red</div>
    <div class="sty1 sty2">Big and red</div>
 
</body>
</html>
?