div_views"/> div_views">

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

How HTML calls CSS to manage and beautify divs

一个新手
一个新手Original
2017-09-22 10:35:192019browse

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>

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;    
    }

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!

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