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;
html如何下载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:729038198,我们将在24小时内删除。