2017-04-21 86 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>