Home  >  Article  >  Web Front-end  >  Detailed explanation of the usage of CSS3 class selectors combined with element selectors and multi-class selectors

Detailed explanation of the usage of CSS3 class selectors combined with element selectors and multi-class selectors

高洛峰
高洛峰Original
2017-03-09 18:44:521829browse

This article explains in detail the usage of css3 class selector, combined element selector and multi-class selector

css3 class selector, combined element selector and multi-class selection Device usage:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .p2{font-size:30px;}
        /*结合元素选择器*/
        p.p1{color:rebeccapurple;}
        /*多类选择器*/
        .p1.p2{font-style: italic;}
    </style>
</head>
<body>
    <div>看我</div>
    <p>我就是我</p>
    <p>我是一段文字</p>
    <p class="p1 p2">我还是斜体字</p>
</body>
</html>


The above is the detailed content of Detailed explanation of the usage of CSS3 class selectors combined with element selectors and multi-class selectors. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn