|-边界边框
|--外边距 margin
.one{ 200px; height: 200px; background-color: orange; margin: 30px 40px 50px 60px; } .two{ 200px; height: 200px; background-color: red; } <div class="one"></div> <div class="two"></div>
|--内边距 padding(padding会加大height和width
.three{ /* 200px;*/ 170px; height: 200px; background-color: blue; padding-left: 30px; margin-top: 30px; } <div class="three">123</div>
|--边框边框 border
.four{ 300px; height: 200px; border: 1px solid blueviolet; margin-top: 30px; } <div class="four"></div>
|----margin-left padding-top border-right border-botton
|----margin/padding:上 右 下 左
|----transparent 透明
.five{ 0px; height: 0px; border-top: 100px solid red; border-left: 100px solid transparent; border-bottom: 100px solid transparent; border-right: 100px solid transparent; margin-top: 30px; } <div class="five"></div>
|----transform 转换(rotate旋转)
.six{ 200px; height: 200px; background-color: deepskyblue; transform: rotate(45deg); margin-left: 100px; } <div class="six"></div>