Home > Web Front-end > HTML Tutorial > How HTML calls CSS to manage and beautify divs

How HTML calls CSS to manage and beautify divs

一个新手
Release: 2017-09-22 10:35:19
Original
2022 people have browsed it

CSS layout, the key lies in the correspondence between HTML files and CSS files. In HTML, the inclusion relationship of each p is designed in a hierarchical manner, and then the style and font equations are designed in the CSS file.
How HTML calls CSS to manage and beautify divs

HTML file

<body><p class=p_body>
    <p class=p_header> p_header  </p>

    <p class="p_views">
        p_views        
        <p class="p_views_post"> p_views_post <?php echo $post ?> </p>
        <p class="p_views_auther"> p_views_auther </p>
        p_views    
        </p>
    <p class=p_floot> p_floot <?php echo $copyright ?> </p></p></body>
Copy after login

CSS file

    .p_body {        
    background-color: darkcyan;    
    }
    .p_header {        
    background-color: lightblue;        
    font-size: 72px;        
    margin-top: 30px;        
    padding-left: 30px;    
    }
    .p_views {        
    background-color: blueviolet;        
    margin-top: 10px;        
    padding-left: 30px;        
    padding-right: 30px;        
    font-size: 48;    
    }
    .p_views_post {        
    background-color: aliceblue;    
    }
    .p_views_auther{        
    background-color: yellowgreen;    
    }
    .p_floot
    {        
    font-size:40px;        
    background-color: lightblue;        
    margin-top: 10px;        
    padding-left: 30px;        
    padding-right: 30px;    
    }
Copy after login

The above is the detailed content of How HTML calls CSS to manage and beautify divs. 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