1

CSSとHTMLだけで曲線を作ろうとしています。何故か横より真ん中の方が線が太い。なぜこうなった?

ここに画像の説明を入力

HTML:

<div class="smile"></div>

CSS:

.smile{
    width: 150px;
    height: 80px;
    border-radius: 50%;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%; 
    border-bottom: 5px solid black;
}
4

1 に答える 1

3

It increases in thickness towards the middle because you have specified the border-width property for the bottom border of the div as 5px. But because there are no declarations for the left or right border properties the border has to render a line from 0px to 5px smoothly in order to render as an appropriately rounded corner. Hence the gradual increase in thickness.

于 2013-01-08T19:06:05.273 に答える