1. class顺序
<style>
.classA{ color:blue;}
.classB{ color:red;}
</style>
<body>
<p class='classB classA'> 123 </p>
</body>
2.盒模型
<div class="box"></div>
.box{
box-sizing:border-box;
width:150px;
height:150px;
padding:10px;
background-color:red;
background-clip:content-box;
}
3.弹性布局
下面蓝色区域的宽度
<div class="box">
<div class=blue></div>
<div class="red"></div>
</div>
.box{
width: 400px;
display: flex;
height: 200px;
}
.red{
flex: 1;
background: red;
}
.blue{
flex: 1;
width: 100px;
background: blue;
}
//宽度为200px
.blue{
flex-grow: 1;
width: 100px;
background: blue;
}
//宽度为250px
.blue{
flex-shrink: 1;
width: 100px;
background: blue;
}
//宽度为100px