纯CSS实现div背景颜色渐变

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CSS渐变色</title>
<style type="text/css">
.test {
width:560px;
height:400px;
background-color:#FFFFFF;
padding:10px 8px 6px; 
border: 1px solid #000; 
margin-bottom:10px;
FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#b8c4cb,endColorStr=#f6f6f8);/*IE6*/
background:-moz-linear-gradient(top,#b8c4cb,#f6f6f8);/*非IE6的其它*/
background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#b8c4cb), to(#f6f6f8));/*非IE6的其它*/
}
</style>
</head>
<body>
        <div class="test">
                用CSS生成的渐变色。
        </div>
</body>
</html>
http://www.codefans.net/jscss/code/2403.shtml 写道
http://www.codefans.net/jscss/code/2403.shtml

相关推荐