CSS Filter 代替 图片 实现 渐变背景效果。

前端开发   发布日期:2025年08月17日   浏览次数:143
以前欲做一个渐变的背景,一般都是用图片。
一次偶然发现用CSS Filter 可以实现相同的效果,而最重要的好处是它可以省去你去下载图片所使用时间。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style></head>

<body>
<table width="100%" height="133"  border="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
    <td style="FILTER: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#FFFFFF', endColorStr='#ADADAD', gradientType='1')" width="48%">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

以上就是CSS Filter 代替 图片 实现 渐变背景效果。的详细内容,更多关于CSS Filter 代替 图片 实现 渐变背景效果。的资料请关注九品源码其它相关文章!