wpf border圆角边框_border-radius 的奇妙之旅

09a492b6bc99cc6ddd9073da6000b90e.png

border-radius 属性

向 div 元素添加圆角边框

案例(1)实现圆角 代码会放在最下面

1e0880397dfec8a67a4f14f70d5ce3ca.png

案例(2)实现圆形

6735e584ea6a2152dc3ba5f0dbf150c4.png

案例(3)叶子、外圆、内圆

border-radius: 0 100%;

background-color: rebeccapurple;

border-radius: 100% 0;

background-color: aqua;

541a40a912497cedf03e10c6e96a04f3.png

background-color: aqua;

border-radius: 50% 50% 0 50%;

background-color: blue;

border-radius: 50% 50% 50% 0;

background-color: red;

border-radius: 50% 0 50% 50%;

background-color: #f40;

border-radius: 0 50% 50% 50%;

18aa95563da2153990f4b009da02b102.png

border-bottom-right-radius: 100px 100px;

border-right: 2px solid #f40;

border-bottom: 2px solid #f40;

border-bottom-left-radius: 100px 100px;

border-left: 2px solid yellow;

border-bottom: 2px solid yellow;

border-top-right-radius: 100px 100px;

border-right: 2px solid green;

border-top: 2px solid green;

border-top-left-radius: 100px 100px;

border-left: 2px solid blueviolet;

border-top: 2px solid blueviolet;

135cec009e4c7bc54cbc377b8f3df874.png
Document

.box{

position: relative;

width: 205px;

}

.box .circular1{

width: 200px;

height: 180px;

border-radius: 0 100%;

background-color: rebeccapurple;

}

.box .circular2{

width: 200px;

height: 180px;

border-radius:100% 0;

position: absolute;

right: 0;

top:0;

background-color: aqua;

opacity: 0.5;

}

.box2{

width: 200px;

height: 200px;

}

.box2 .circular{

width: 100px;

height: 100px;

float: left;

background-color: aqua;

}

.box2::after{

content: '';

display: block;

clear: both;

}

.box2 .circular.box2-1{

background-color: aqua;

border-radius: 50% 50% 0 50%;

}

.box2 .circular.box2-2{

background-color:blue;

border-radius: 50% 50% 50% 0;

}

.box2 .circular.box2-3{

background-color: red;

border-radius: 50% 0 50% 50%;

}

.box2 .circular.box2-4{

background-color: #f40;

border-radius:0 50% 50% 50%;

}

.box3{

width: 204px;

height: 204px;

border: 5px solid blue;

border-radius: 50%;

overflow: hidden;

}

.box3 .circular{

width: 100px;

height: 100px;

float: left;

float: left;

}

.box3 .circular.box3-1{

border-bottom-right-radius: 100px 100px;

border-right: 2px solid #f40;

border-bottom: 2px solid #f40;

}

.box3 .circular.box3-2{

border-bottom-left-radius: 100px 100px;

border-left: 2px solid yellow;

border-bottom: 2px solid yellow;

}

.box3 .circular.box3-3{

border-top-right-radius: 100px 100px;

border-right: 2px solid green;

border-top: 2px solid green;

}

.box3 .circular.box3-4{

border-top-left-radius: 100px 100px;

border-left: 2px solid blueviolet;

border-top: 2px solid blueviolet;

}

.box4{

width: 200px;

height: 200px;

border: 5px solid blueviolet;

border-radius: 10px;

margin-top: 20px;

}

.box5{

width: 200px;

height: 200px;

border: 5px solid blueviolet;

border-radius: 100px;

margin-top: 20px;

}

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值