2014-01-25 97 views

回答

4

在这里你去:http://jsfiddle.net/dennisbest/bE2jB/1/

HTML:

<div class="box"></div> 

CSS:

.box { 
    background : white; 
    border  : 1px solid #555; 
    border-radius : 10px; 
    height  : 125px; 
    margin  : 20px; 
    width   : 255px; 
} 
.box:before { 
    background : grey; 
    border-radius : 10px; 
    content  : ' '; 
    display  : block; 
    height  : 125px; 
    left   : -10px; 
    margin  : 20px 0; 
    position  : relative; 
    top   : -30px; 
    width   : 255px; 
    z-index  : -1; 
} 
+0

谢谢。但影子不来.. – PoliDev

+0

你使用什么浏览器? –

+0

铬只..但在我的CSS边界半径属性没有采取。它显示错误行'border-radius不被称为css属性名称' – PoliDev