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

高洛峰
Release: 2017-03-09 18:44:52
Original
1822 people have browsed it

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>
Copy after login


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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!