2017-02-05 4 views
-3

Wie kann ich einen halben Kreis wie dieses Bild in CSS zeichnen. enter image description hereZeichnen eines halben Kreises in CSS

und nur CSS-Definitionen verwenden. Kein SVG, WebGL, DirectX erlaubt.

+0

Bild Sie suchen, mit Wiederholung x Eigenschaft als Hintergrund festgelegt ist. Deshalb sieht es wie eine runde Grenze aus. – tilz0R

Antwort

3

So etwas würde wahrscheinlich funktionieren:

.box { 
 
    width: 604px; 
 
    border-width: 0 1px 1px; 
 
    border-color: #ddd; 
 
    border-style: solid; 
 
    overflow: hidden; 
 
} 
 
.circles { 
 
    border-top: 1px solid #ddd; 
 
    display: flex; 
 
    list-style-type: none; 
 
    margin: 0; 
 
} 
 

 
.circles li { 
 
    background-color: white; 
 
    width: 30px; 
 
    height: 30px; 
 
    border-radius: 100%; 
 
    border-width: 0 1px 1px; 
 
    border-color: #ddd; 
 
    border-style: solid; 
 
    margin: 0 17px; 
 
    position: relative; 
 
    transform: translateY(-50%); 
 
}
<div class="box"> 
 
    <ul class="circles"> 
 
    <li></li> 
 
    <li></li> 
 
    <li></li> 
 
    <li></li> 
 
    <li></li> 
 
    <li></li> 
 
    <li></li> 
 
    <li></li> 
 
    </ul> 
 
    Circles for the win 
 
    
 
</div>

+0

Große Antwort Mann! –

Verwandte Themen