如何绘制CSS形状

时间:2017-04-21 02:10:47

标签: css

可以绘制类似(不一定完全)的CSS形状:

enter image description here

由于

1 个答案:

答案 0 :(得分:2)

我认为使用SVG会更好,或者只是使用photoshop制作.png

但是使用css肯定可以做到



.the1 {
		position: fixed;
    background-color:white;
    width:100%;
		left: -15%;
    height:100%;
		top: 12%;
    border-top-left-radius:50%;
    border-top-right-radius:100%;
}


.the2 {
		position: fixed;
    background-color: white;
    width:100%;
		left: 15%;
    height:100%;
		top: 12%;
    border-top-left-radius:100%;
    border-top-right-radius:10%;
}

.the3 {
		position: fixed;
    background-color: red;
    width:50%;
		left: 52%;
    height:32%;
		top:3%;
    border-bottom-left-radius:100%;
    border-bottom-right-radius:50%;
}

body{
	background: red;
}

<div class="bg">


<div class="the1">
</div>
<div class="the2"></div>
<div class="the3"></div>

</div>
&#13;
&#13;
&#13;