在网页设计中,经常会使用边框和背景图来美化页面,但是传统的边框和背景图都是规则的,无法满足设计师的创意需求。为了解决这个问题,CSS中提供了不规则边框和背景图的实现方式。 不规则边框 不规则边框可以为
html <style> .border { border-top: 4px dotted #333; border-left: 4px solid #333; border-bottom: 4px solid #333; border-right: 4px dotted #333; <br> height: 200px; width: 200px; } </style> <br> <div class="border">不规则边框</div>
html <style> .background { background-image: url('leaf.png'); background-repeat: no-repeat; background-size: cover; height: 200px; padding: 20px; } </style> <br> <div class="background">不规则背景图</div>
粉丝
0
关注
0
收藏
0