-2
A
回答
1
其实我不应该回答这个问题。当你困在你的代码中时,SO是为了帮助你,而不是让别人为你写代码。但是,嘿,这是复活节,并且因为它是那么容易......
div {
background: black;
width: 250px;
height: 250px;
border-radius: 50%;
margin-left: 150px;
position: relative;
}
div:before {
content: '';
position: absolute;
left: -150px;
top: 50px;
bottom: 50px;
right: -75px;
background: red;
border-top-left-radius: 40px 75px;
border-bottom-left-radius: 40px 75px;
z-index: -1;
}
和演示:http://jsfiddle.net/o004hrqz/
让我知道如果你要我解释什么。
0
<html>
<head>
<style type="text/css">
.div1 {
width: 250px;
height: 60px;
margin-top: 50px;
background-color: #F00;
position: relative;
border-top-left-radius: 40px 75px;
border-bottom-left-radius: 40px 75px;
}
.div2 {
width: 100px;
height: 100px;
background-color: #000;
border-radius: 50%;
position: absolute;
left: 40px;
top: -20px;
}
</style>
</head>
<body>
<div class="div1">
<div class="div2">
</div>
</div>
</body>
</html>
相关问题
- 1. CSS3边框半径和IE9
- 2. CSS3边框半径
- 3. CSS如何使内部的div边框半径与外层div边框半径
- 4. 带边框半径的多线圆角
- 5. Highcharts:绘图边框的圆角半径
- 6. 如何在圆角边框的css3 div中居中字符
- 7. 圆角边框使用半径
- 8. 在WPF Expander控件上更改边框的圆角半径?
- 9. CSS3 PIE,IE8和边框半径
- 10. 为div创建边框半径
- 11. CSS3 - 如何在矩形上创建圆形边框半径?
- 12. 围绕div的半边框
- 13. 设定圆角(边框半径)的Internet Explorer IE6 +使用ie-css3.htc 源
- 14. 边框左上角和右半径不能在我的div元素上工作
- 15. 问题的边界半径圆角
- 16. 如何向圆角图像添加圆角边框(使用边框半径圆角)
- 17. 边框顶部和边框半径CSS3问题
- 18. CSS3缩放动画带边框半径
- 19. CSS3边框半径裁剪发出
- 20. CSS3边框半径背景重叠
- 21. jQuery UI调整大小 - DIV边框圆角
- 22. React Native中的椭圆边框半径
- 23. 边框半径圆角没有出现在打印
- 24. 使用边框半径绘制圆圈
- 25. div的弯角边框
- 26. 左半圆边框
- 27. UIToolbar上的圆角半径?
- 28. CSS3角边框
- 29. 边框半径产生日食,需要90度圆角。 CSS
- 30. 围绕div的CSS3渐变边框
你试过了什么 – vals 2015-04-05 19:13:58