如何为三角形添加不同颜色的圆底?
#box {
content:"";
width: 0;
height: 0;
border-style: solid;
border-width: 0 150px 150px 150px;
border-color: transparent yellow red blue;
position: relative;
}
Run Code Online (Sandbox Code Playgroud)
生产:
我需要的是底部的绿色部分,圆角:
小智 6
我想这会对你有所帮助
#box {
content:"";
width: 0;
height: 0;
border-style: solid;
border-width: 0 150px 150px 150px;
border-color: transparent yellow red blue;
position: relative;
}
#box:before{
content: '';
width: 300px;
height: 300px;
display: block;
background-color:green;
border-radius: 50%;
position: absolute;
left: -150px;
z-index: -1;
}
Run Code Online (Sandbox Code Playgroud)
片段:
#box {
content:"";
width: 0;
height: 0;
border-style: solid;
border-width: 0 150px 150px 150px;
border-color: transparent yellow red blue;
position: relative;
}
#box:before{
content: '';
width: 300px;
height: 300px;
display: block;
background-color:green;
border-radius: 50%;
position: absolute;
left: -150px;
z-index: -1;
}Run Code Online (Sandbox Code Playgroud)
<div id="box"></div>Run Code Online (Sandbox Code Playgroud)
检查小提琴