用CSS实现表格背景颜色渐变效果
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>建站学习网</title>
<style>
td {
text-align:center;
color:white;
font-family:宋体;
font-size:15px;
font-weight:bold;
border:2 dashed #FFFFFF;
}
table {
table-layout:fixed;
border:2 dashed blue;
width:567;
height:234;
filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr=#990099, endcolorstr=#FFCCFF, gradientType=1);
}
body {
filter:progid:DXImageTransform.Microsoft.gradient(startcolorstr=#86CEFF, endcolorstr=#000099, gradientType=1);
}
</style>
</head>
<body>
<center>
<table border="0" cellspacing="20" cellpadding="2">
<tr>
<td style="filter:progid:DXImageTransform.Microsoft.gradient(startcolorstr=#FF0000,endcolorstr=#FFCC66,gradientType=1)"> 建站学习网 </td>
<td style="filter:progid:DXImageTransform.Microsoft.gradient(startcolorstr=#006600,endcolorstr=#99FF99,gradientType=0)"> DIV+CSS</td>
</tr>
</table>
<!--
gradientType=1代表横向渐变,gradientType=0代表纵向淅变
渐变效果实现:filter:progid:DXImageTransform.Microsoft.gradient(startcolorstr=#FF0000,endcolorstr=#FFCC66,gradientType=1)
-->
</body>
</html>
本文网址:https://www.dedexuexi.com/divcss/bj/1548.html
本站部分文章搜集与网络,如有侵权请联系本站,转载请说明出处。
标签:前端