900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > html如何给图片加四周边框 css如何给div加上四角边框

html如何给图片加四周边框 css如何给div加上四角边框

时间:2020-02-19 12:01:16

相关推荐

html如何给图片加四周边框 css如何给div加上四角边框

先看效果图

HTML代码(注:view是微信小程序中的div,如果是html或者vue换成div即可):

CSS代码:

.a {

width: 10px;

height: 10px;

position: absolute;

top: 0;

left: 0;

border-left: 2px solid #EBEBEB;

border-top: 2px solid #EBEBEB;

}

.b {

width: 10px;

height: 10px;

position: absolute;

top: 0;

right: 0;

border-right: 2px solid #EBEBEB;

border-top: 2px solid #EBEBEB;

}

.c {

width: 10px;

height: 10px;

position: absolute;

bottom: 0;

left: 0;

border-bottom: 2px solid #EBEBEB;

border-left: 2px solid #EBEBEB;

}

.d {

width: 10px;

height: 10px;

position: absolute;

bottom: 0;

right: 0;

border-right: 2px solid #EBEBEB;

border-bottom: 2px solid #EBEBEB;

}

即可实现效果。

标签:right,solid,2px,边框,10px,div,border,css,EBEBEB

来源: /qq_43358160/article/details/114580148

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。