html如何设置边角,css设置四角边框

1、代码

四角边框

body{

display: flex;

flex-direction: row;

justify-content: center;

align-items: center;

}

.sijiaobiankuang{

width: 400px;

height: 400px;

background:

linear-gradient(to top, #306EEF, #306EEF) left top no-repeat,/*上左*/

linear-gradient(to right, #306EEF, #306EEF) left top no-repeat,/*左上*/

linear-gradient(to left, #306EEF, #306EEF) right top no-repeat,/*上右*/

linear-gradient(to bottom, #306EEF, #306EEF) right top no-repeat,/*上右*/

linear-gradient(to left, #306EEF, #306EEF) left bottom no-repeat,/*下左*/

linear-gradient(to bottom, #306EEF, #306EEF) left bottom no-repeat,/*左下*/

linear-gradient(to top, #306EEF, #306EEF) right bottom no-repeat,/*下右*/

linear-gradient(to left, #306EEF, #306EEF) right bottom no-repeat;/*右下*/

background-size: 2px 16px, 16px 2px, 2px 16px, 16px 2px;

background-color: rgba(36,56,128,0.21);

}

Hello,小诸葛的博客

2、运行效果

f35fc3f5c75e3a40657ca9f33e4615cb.png

标签:四角,repeat,linear,no,gradient,306EEF,边框,css,left

来源: https://blog.csdn.net/LONG_Yi_1994/article/details/111274485

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值