2015-05-12 20 views
-3

我很想知道是否可以使用與以下圖像類似的css3創建邊框?可能性CSS3與圖像類似的邊框

enter image description here

+4

是的,它是....... – Andrew

+1

圖像不上究竟是*邊框效果*非常清晰。如果你能描述效果會更好。雖然不是強制性的,但如果您可以向我們展示您的嘗試,也會很好。 – Harry

回答

1

使用box-shadow

body { 
 
    background: grey 
 
} 
 
div { 
 
    position: absolute; 
 
    width: 70%; 
 
    height: 30%; 
 
    top: 0; 
 
    right: 0; 
 
    bottom: 0; 
 
    left: 0; 
 
    margin: auto; 
 
    background: #666; 
 

 
/* BOX SHADOW APPLIES THE EFFECT YOU'RE AFTER */ 
 
    box-shadow: inset 0 -18px 16px -16px #444, 0 6px 6px -7px #fff, 0 14px 8px -7px #444; 
 
}
<div></div>

+0

Thx爲快速的答案,完美的作品! – SP7