下面给出了html示例代码和包含在其中的css代码,里面用的图片为fd.jpg,复制代码,并将一张图片命名为fd.jpg即可看到全部效果
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>CSS滤镜效果.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <style type="text/css"> .alphas { filter:alpha(opacity=0,finishopacity=100,style=1,startx=0,starty=85,finishx=150,finishy=85); } .blurs { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px;/*这个属性不可少,否则效果不可见*/ filter:blur(add=true,direction=90,strength=25); } .chromas { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:red; width:350px; filter:chroma(color=red); } .dropshadows { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:dropshadow(color=red,offx=15,offy=10,positive=1); } .fliphs { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:fliph; } .flipvs { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:flipv; } .glows { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:glow(color=blue,strength=15); } .grays { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:gray; } .inverts { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:invert; } .masks { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:mask(color=green); } .shadows { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:shadow(color=red,direction=225); } .waves { font-family:lucida handwirting italic; font-size:72px; font-style:bold; color:#336600; width:350px; filter:wave(add=true,freq=3,lightstrength=100,phase=45,strengt |