css+图片实现文字的渐变显示特效,这个文字渐变特效兼容ie和火狐浏览器,根据自己的需求来修改即可。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>几款文字渐变特效代码分享_武鸣人</title> </meta> <style> body { margin:0; padding:2em 4em; background:#fff; font:90% Arial, Helvetica, sans-serif; color:#666; line-height:180%; } h1 { font-size:300%; line-height:1em; color:#8bb544; font-weight:bold; text-transform:uppercase; letter-spacing:-.05em; position:relative; } h2 { font-size:260%; color:#0079b6; font-weight:bold; letter-spacing:-.05em; position:relative; margin:.6em 0; padding-top:1px; /* use top padding to adjust the start of the gradient */ width:100%; } h3 { font-size:240%; color:#7365a0; font-weight:bold; text-transform:uppercase; letter-spacing:-.05em; padding-top:3px; position:relative; margin:.6em 0; width:100%; } h4 { font-size:220%; color:#dc5b24; font-weight:normal; letter-spacing:-.05em; position:relative; margin:.6em 0; padding-top:1px; width:100%; } h1 span, h2 span, h3 span, h4 span{ position:absolute; display:block; top:0; left:0; height:100%; width:100%; background:url(/img/20240425_www_wuming_ren_2.png) repeat-x; } h1 span, h3 span{background:url(/img/20240425_www_wuming_ren_1.png) repeat-x;} * html h1 span, * html h3 span{ background-color:#fff; back\ground-color:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/img/20240425_www_wuming_ren_1.png", sizingMethod="scale"); } * html h2 span, * html h4 span{ background-color:#fff; back\ground-color:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/img/20240425_www_wuming_ren_2.png", sizingMethod="scale"); } </style> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <h1>武鸣人一号渐变文字<span></span></h1> <h2>武鸣人二号渐变文字<span></span></h2> <h4>武鸣人三号渐变文字<span></span></h4> <h5>IE6/7、FF2兼容<span></span></h5> </body> </html>
本文来自武鸣人网站,转载请注明出处