这可以用 CSS 实现吗?(颜色不重要,只是底部是椭圆形)
问问题
1141 次
2 回答
10
尝试
background-color: #60a0d0;
border-bottom-left-radius:50% 10%;
border-bottom-right-radius:50% 10%;
(带有适当的浏览器前缀)
于 2012-10-25T08:30:21.700 回答
0
你可以得到任何带有椭圆或圆的曲线,放在主块后面:http: //jsfiddle.net/e9RLQ/1/
.box {
position: relative;
background: #60a0d0;
}
.box:after {
position: absolute;
z-index: -1;
left: 0;
top: 100%;
width: 300%;
height: 300px;
margin: -292px 0 0 -100%;
background: #60a0d0;
border-radius: 50%;
content: "";
}
这里的缺点是添加渐变背景的复杂性。
于 2012-10-25T09:15:36.813 回答