2017-04-21 89 views
-1

可以得出CSS形状像(但不一定是精确):如何绘制一个CSS形状

enter image description here

感谢

+3

在[所以]你应该尝试**自己写代码**。后** [做更多的研究](//meta.stackoverflow.com/questions/261592)**如果你有问题,你可以**发布你已经尝试**与清楚的解释是什么是'工作**并提供[** Minimal,Complete和Verifiable示例**](// stackoverflow.com/help/mcve)。我建议阅读[问]一个好问题和[完美问题](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/)。另外,一定要参加[游览]并阅读[this](// meta.stackoverflow.com/questions/347937/)**。 –

回答

2

它会随着SVG好多了,我认为,或者只是用photoshop做一个.png

但使用CSS相信你能做到这一点

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

 

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

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

 
body{ 
 
\t background: red; 
 
}
<div class="bg"> 
 

 

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

 
</div>