2013-10-10 81 views
0

我使用CSS,你可以看到下面的圓圈創建:陰影/亮度

.circle { 
    width: 40px; 
    height: 40px; 
    -moz-border-radius: 50px; 
    -webkit-border-radius: 50px; 
    border-radius: 50px; 
    text-align: center; 
    margin-left:auto; 
    margin-right:auto; 
    color: #555555; 
    line-height: 40px; 
    font-weight: bold; 
    border: 4px solid #333; 
} 

如何創建使用CSS陰影/解決這個圈子的亮度,你可以在看下面的示例圖片?

enter image description here

提前感謝!

+1

備註:您應該將'border-radius'設置爲'50%'而不是50px,因此如果您想稍後更改尺寸,則可以輕鬆縮放圓圈! – shshaw

回答

1

您可以使用box-shadow尊重border-radius屬性的屬性。

像這樣的事情jsFiddle

box-shadow: 0 0 1em #FFD800;