Detailed explanation of the use of css3 multi-class selectors

php中世界最好的语言
Release: 2018-03-22 10:17:13
Original
2149 people have browsed it

This time I bring you css3 multi-class class selector Detailed explanation of use, what are the precautions when using css3 multi-class selector, the following is a practical case, let’s take a look .

The following code introduces you to the combination of css3 class selectors Element selector and the usage of multi-class selectors. The specific code is as follows:

<!DOCTYPE html>
<html lang="en">
<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>
    <p class="p1">看我</p>
    <p class="p1">我就是我</p>
    <p class="p2">我是一段文字</p>
    <p class="p1 p2">我还是斜体字</p>
</body>
</html>
Copy after login

I believe I have read it You have mastered the method in the case of this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Bootstrap implementation price list

How does CSS handle the browser’s default style

CSS has several ways to implement a three-column layout

The above is the detailed content of Detailed explanation of the use of css3 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!