Blogger Information
Blog 13
fans 0
comment 0
visits 10455
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
写一个盒模型的简单案例,体会padding/border的简写规则
PHPer博客
Original
686 people have browsed it

<!DOCTYPE html>
<html lang="zh-cn">
<head>
   <meta charset="UTF-8">
   <title>写一个盒模型的简单案例,体会padding/border的简写规则</title>
   <style>
       .box01{
           width: 300px;
           height:300px;
           /*padding-top:10px;*/
           /*padding-right:20px;*/
           /*padding-bottom:30px;*/
           /*padding-left:40px;*/

           padding:10px 20px 30px 40px;  /* 内边距上右下左简写*/

       }
       .box02{
           width: 150px;
           height: inherit;/*inherit:继承,好处就是父盒子改了高度,子盒子会随之改变*/
           border-top-color:red;
           border-top-width: 15px;
           border-top-style:solid ;

           /*右边框简写*/
           border-right:25px blue dotted;
       }

   </style>

</head>
<body>
<div class="box01">
   <div class="box02"></div>
</div>
</body>
</html>

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post