CSS實現陰影文字效果_CSS/HTML

來源:互聯網
上載者:User
<style type="text/css"> <!-- .title_1 { font-family: "Verdana"; font-size: 12px; color: #E1E4EC; width: 100%; filter: DropShadow(Color=#213C63, OffX=1, OffY=1)} .text { font-family: "Verdana"; font-size: 12px; line-height: 16px; color: #666699; text-decoration: none} .unnamed1 { filter: DropShadow(Color=#FFFFFF, OffX=1, OffY=1)} --> </style> <table width="500" border="0" cellspacing="1" cellpadding="0" bgcolor="#8C96B5" align="center"> <tr> <td bgcolor="#FFFFFF"> <table bordercolordark=#ffffff width="100%" bordercolorlight=#000000 border=0 cellspacing="1" cellpadding="0"> <tr bgcolor="#8C96B5"> <td colspan=2 bgcolor="#8C96B5" width="100%" height="16"> ..:: 巧用CSS製作藝術字 ::.. </td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text">如果靈活應用CSS各種濾鏡的特點並加以組合,我們可以得到許多意想不到的效果。這是一些效果示範,供各位參考。</td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text"> <table align=center border=0 width="200" height="50"> <tr> <td style="FILTER: blur(direction=135,strength=8)" align="center"><b><i>E流設計</i></b></td> </tr> </table> 用blur濾鏡做出的效果,代碼如下: <b>FILTER: blur(direction=135,strength=8)</b></td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text"> <table align=center border=0 width="200" height="50"> <tr> <td style="FILTER: dropshadow(color=#B4BBCF,offx=6,offy=6,positive=1)" align="center"><b><i>E流設計</i></b></td> </tr> </table> 用dropshadow濾鏡做出的效果,代碼如下: <b>FILTER: dropshadow(color=#B4BBCF,offx=6,offy=6,positive=1)</b></td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text"> <table align=center border=0 width="200" height="50"> <tr> <td style="FILTER: glow(color=#B4BBCF,strength=5)" align="center"><b><i>E流設計</i></b></td> </tr> </table> 用glow濾鏡做出的效果,代碼如下: <b>FILTER: glow(color=#B4BBCF,strength=5)</b></td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text"> <table align=center border=0 width="200" height="50"> <tr> <td style="FILTER: alpha(opacity=100,finishiopacity=0,style=1)shadow(color=#8C96B5,direction=135)" align="center"><b><i>E流設計</i></b></td> </tr> </table> 這個效果用到了兩種濾鏡:shadow和alpha,代碼如下: <b>FILTER: alpha(opacity=100,finishiopacity=0,style=1) shadow(color=#8C96B5,direction=135)</b> </td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text"> <table align=center border=0 width="200" height="50"> <tr> <td style="FILTER: mask(color=#E1E4EC)shadow(color=#8C96B5,direction=135)chroma(color=#E1E4EC)" align="center"><b><i>E流設計</i></b></td> </tr> </table> 這個效果也用到兩個濾鏡mask和shadow,代碼如下: <b>FILTER: mask(color=#E1E4EC) shadow(color=#8C96B5,direction=135)chroma(color=#E1E4EC)</b> 注意:mask的顏色要和網頁背景色一致,字型的顏色由shadow決定。</td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text"> <table align=center border=0 width="200" height="50"> <tr> <td style="FILTER: mask(color=#E1E4EC)dropshadow(color=#B4BBCF,offx=-3,offy=-3,positive=1)chroma(color=#E1E4EC)" align="center"><b><i>E流設計</i></b></td> </tr> </table> 如果說上面的效果是陰文的話,那麼這個效果的應該算是陽文了,用兩個濾鏡實現mask和dropshadow,注意mask的顏色要和網頁背景色一致,或者把mask和chroma成對使用,也可達到同樣效果。代碼如下: <b>FILTER: mask(color=#E1E4EC) dropshadow(color=#B4BBCF,offx=-3,offy=-3,positive=1) chroma(color=#E1E4EC)"</b> </td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0" class="unnamed1"> <tr> <td class="text"> <table align=center border=0 width="200" height="50"> <tr> <td style="FILTER: glow(color=#8C96B5,strength=2)shadow(color=#B4BBCF,direction=135)" align="center"><b><i>E流設計</i></b></td> </tr> </table> 用glow濾鏡可以做空心字,方法是將字型顏色設定為背景色,再將glow濾鏡的strenght的值設定為1或2即可。這個效果的代碼如下: <b>FILTER: glow(color=#8C96B5,strength=2) shadow(color=#B4BBCF,direction=135)</b> </td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0"> <tr> <td class="text"> <table height=150 width=200 align=center background="http://www.e-flowing.com/1/bg_1.jpg" border=0> <tr> <td style="FILTER: mask(color=#E1E4EC)shadow(color=#B4BBCF,direction=135)chroma(color=#E1E4EC)" align="center"><b><i>E流設計</i></b></td> </tr> </table> <table height=150 width=200 align=center background="http://www.e-flowing.com/1/bg_2.jpg" border=0> <tr> <td style="FILTER: glow(strength=1)mask(color=#B4BBCF)chroma(color=#B4BBCF)" align="center" height=54><b><i>E流設計</i></b></td> </tr> </table> <table height=150 width=200 align=center background="http://www.e-flowing.com/1/bg_3.jpg" border=0> <tr> <td style="FILTER: mask(color=#E1E4EC)dropshadow(color=#B4BBCF,offx=-3,offy=-3,positive=1)chroma(color=#E1E4EC)" align="center" height=54><b><i>E流設計</i></b></td> </tr> </table> </td> </tr> <tr> <td class="unnamed1">如果背景採用圖片,為了能達到滿意的效果需要將mask和chroma組合使用,這樣能使字型感覺是透明的,讓背景透出來。 上面列出的效果前者的代碼是: <b>FILTER: mask(color=#E1E4EC) shadow(color=#B4BBCF,direction=135) chroma(color=#E1E4EC)</b> 注意:字型的顏色由shadow決定,mask和chroma的顏色要相同,色彩任意。 中間的代碼是: <b>FILTER: glow(strength=1) mask(color=#B4BBCF) chroma(color=#B4BBCF)</b> 注意:mask和chroma的顏色相同,這個顏色決定了字型的顏色。 後者的代碼是: <b>FILTER: mask(color=#E1E4EC) dropshadow(color=#B4BBCF,offx=-3,offy=-3,positive=1) chroma(color=#E1E4EC)</b> 注意:mask和chroma的顏色相同,色彩由dropshadow決定。</td> </tr> </table> </td> </tr> <tr> <td bgcolor="#E1E4EC"> <table width="100%" border="0" cellspacing="8" cellpadding="0"> <tr> <td class="text"> <table height=150 cellspacing=0 cellpadding=0 width=480 align=center background="http://www.e-flowing.com/1/bg_1.jpg" border=0> <tr> <td style="FILTER: glow(strength=4)mask(color=#E1E4EC)" height=109 align="center" valign="middle"><i><b>WELCOME TO </i></td>" TARGET=_blank>WWW.E-FLOWING.COM</b></i></td> </tr> </table> </td> </tr> <tr> <td class="unnamed1">這個效果的代碼: <b>FILTER: glow(strength=4)mask(color=#E1E4EC)</b></td> </tr> </table> </td> </tr> </table>
[Ctrl+A 全選 注:如需引入外部Js需重新整理才能執行]
  • 相關文章

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.