确实有可能,请注意阴影和渐变所需的规则数量是由于不同的浏览器需要不同的语法(-moz-
是 Firefox 供应商前缀等)。这里有一些方便的工具,可以轻松实现跨浏览器渐变和框阴影。
在此处阅读有关线性渐变和框阴影的更多信息:
jsFiddle
.main_content
{
width:100%;
height:auto;
margin:0 auto;
padding:0 0 50px;
/*background-color:#00F;*/
/* Add rounded border to top left and top right */
border-top-left-radius:6px;
border-top-right-radius:6px;
/* Apply the gradient as a background image */
background-image: linear-gradient(bottom, rgb(79,110,189) 0%, rgb(44,188,207) 100%);
background-image: -o-linear-gradient(bottom, rgb(79,110,189) 0%, rgb(44,188,207) 100%);
background-image: -moz-linear-gradient(bottom, rgb(79,110,189) 0%, rgb(44,188,207) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(79,110,189) 0%, rgb(44,188,207) 100%);
background-image: -ms-linear-gradient(bottom, rgb(79,110,189) 0%, rgb(44,188,207) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(79,110,189)),
color-stop(1, rgb(44,188,207))
);
/* Apply white shadow on bottom */
-webkit-box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.75);
-moz-box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.75);
box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.75);
}
body {
margin:0;
background-color:gray;
}