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.
<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>
.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!