W
W
whist942014-09-07 15:51:59
css
whist94, 2014-09-07 15:51:59

How to draw a semicircle in CSS?

More precisely 200px wide from its full 500px. What properties and how to set

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Petrov, 2014-09-07
@Petroveg

jsfiddle.net/ffvv40wr/1
Can be implemented with both border-radius and SVG.
Of course, both options are better to use in the background, otherwise you will have to set absolute positioning (or fixed, which is even worse).
Using SVG has the advantage that by setting only the height and width, you don't have to worry about the rounding radius (as you can see in the 3rd example, when you have to change the width for :before).

L
Lici, 2014-09-07
@Lici

or border radius

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question