我认为这对你有帮助
html
<div class="contentTop">
</div>
<div class="separator"></div>
<div class="contentBottom">
</div>
css
.contentTop{
height:100px;
background:#ffffff;
/* For WebKit (Safari, Google Chrome etc) */
background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#f1f1f1));
/* For Mozilla/Gecko (Firefox etc) */
background:-moz-linear-gradient(top, #fff, #f1f1f1);
/* For Internet Explorer 5.5 - 7 */
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#fff, endColorstr=#f1f1f1);
/* For Internet Explorer 8 */
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#fff, endColorstr=#f1f1f1)";
}
.contentBottom{
height:100px;
background:#f5f5f5;
/* For WebKit (Safari, Google Chrome etc) */
background:-webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#fff));
/* For Mozilla/Gecko (Firefox etc) */
background:-moz-linear-gradient(top, #f5f5f5, #fff);
/* For Internet Explorer 5.5 - 7 */
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#f5f5f5, endColorstr=#fff);
/* For Internet Explorer 8 */
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#f5f5f5, endColorstr=#fff)";
}
.separator{
border-top:solid 1px #eaeaea;
height:1px;
font-size:0;
line-height:0;
}
这是jsFiddle 文件