查看: 12295|回復: 59
打印 上一主題 下一主題

[教程] 用代碼做動態(tài)的濾鏡效果

[復制鏈接]

該用戶從未簽到

鮮花(0) 雞蛋(0)
跳轉(zhuǎn)到指定樓層
樓主
發(fā)表于 2008-3-11 22:26 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
在這特別感謝黎民百興提供的Wave動態(tài)濾鏡代碼!






<DIV style="position:relative; top:0px; left:0px; width:800px;height:500px">
<STYLE type="text/css">
<!--
.time{
behavior:url(#default#time2);
}
t\:* {
behavior: url(#default#time2);
}
v\:* {
behavior: url(#default#VML);
}
-->
</STYLE>
<?import namespace = t urn = "urn:schemas-microsoft-com:time" implementation = "#default#time2" declareNamespace />
<div style="position:absolute; top:0; left:0; width:300; height:234;">
<IMG src="<IMG id="s1" src="</div>
<t:animate targetElement="s1" attributeName="filters.Wave.Phase" from="100" to="0" begin="0" dur="2" end="" autoreverse="false" repeatcount="indefinite"/></div>




Wave濾鏡
Wave濾鏡



<DIV style="position:relative; top:30px; left:0px; width:700px;height:300px;">
<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = "urn:schemas-microsoft-com:time" implementation = "#default#time2" declareNamespace />
<div style="position:absolute; top:0; left:0;"><font face=楷書 color=#00ff00 size=7>Wave濾鏡</font></div>
<div id=z1 style="position:absolute; top:40; left:0;filter: Wave(Add=0,Freq=3,Lightstrength=30,Phase=10,Strength=3) Flipv;"><font face=楷書 color=#00ff00 size=7>Wave濾鏡</font></div>
<t:animate targetElement="z1" attributeName="filters.Wave.Phase" from="500" to="0" begin="0" dur="3" end="" autoreverse="false" repeatcount="indefinite"/></div>


[ 本帖最后由 小白兔 于 2008-3-11 22:46 編輯 ]

該用戶從未簽到

鮮花(0) 雞蛋(0)
沙發(fā)
 樓主| 發(fā)表于 2008-3-11 22:32 | 只看該作者

Glow濾鏡效果




<DIV style=\"position:relative; top:30px; left:0px; width:700px;height:300 \">
<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = \"urn:schemas-microsoft-com:time\" implementation = \"#default#time2\" declareNamespace />
<IMG id=\"t2\" src=\"http://media.imhb.cn/homepic/2007/12/8/20071208225517_52486.gif\" style=\"position:absolute; left:0; top:0; width:300; height:212;filter:glow(color=#ee14d2 strength=20);color:white\">

<t:animate targetElement=\"t2\" attributeName=\"filters.glow.strength\" from=\"6\" to=\"0\" begin=\"0\" dur=\"1\" end=\"\" autoreverse=\"false\" repeatcount=\"indefinite\"/></div>

Glow濾鏡




<DIV style=\"position:relative; top:30px; left:0px; width:700px; height:150\">
<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = \"urn:schemas-microsoft-com:time\" implementation = \"#default#time2\" declareNamespace />

<div id=z2 style=\"width:100%;filter:glow(color=#1e90ff strength=16);color:white\"><FONT color=#00ff00 face=楷書 size=7>

Glow濾鏡</FONT></div>

<t:animate targetElement=\"z2\" attributeName=\"filters.glow.strength\" from=\"10\" to=\"0\" begin=\"0\" dur=\"1\" end=\"\" autoreverse=\"false\" repeatcount=\"indefinite\"/></div>

對以上這段代碼的說明:

1)<DIV style=\"position:relative; top:30px; left:0px; width:700px; height:150\">是對以下內(nèi)容的相對定位。

  

top:30px;是離頂部距離30px;left:0px; 是離左邊距離0px;

2)<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = \"urn:schemas-microsoft-com:time\" implementation = \"#default#time2\" declareNamespace />

這是HTML+TIME下面指定內(nèi)容的前綴

3)<div id=z2 style=\"width:100%;filter:glow(color=#1e90ff strength=16);color:white\">這段是Glow濾鏡代碼。

id=z2 是對這個濾鏡的標簽(注:與下面的 targetElement=\"z2\"必須一致,同一個頁面不能使用同樣的id)

4)<t:animate targetElement=\"z2\" attributeName=\"filters.glow.strength\" from=\"10\" to=\"0\" begin=\"0\" dur=\"1\" end=\"\" autoreverse=\"false\" repeatcount=\"indefinite\"/>這段是讓Glow連續(xù)性變化的代碼。

t:animate 是標記連續(xù)性地變化;

targetElement=\"z2\"表示目標單元為\"z2\",用來表示作用到\"z2\"上;

attributeName=\"filters.glow.strength\" 表示屬性的名字是\"filters.glow.strength\"

from=\"10\" to=\"0\"表示變化的范圍從10到0;

begin=\"0\" dur=\"1\" 表示從0秒鐘開始變化,變化一次的時間過程為1秒鐘;

autoreverse=\"false\"表示變化方式為不循環(huán),true為循環(huán);

repeatcount=\"indefinite\"表示變換次數(shù)為重復變化。

[ 本帖最后由 小白兔 于 2008-3-22 13:11 編輯 ]

該用戶從未簽到

鮮花(0) 雞蛋(0)
板凳
 樓主| 發(fā)表于 2008-3-11 22:44 | 只看該作者

Shadow濾鏡效果




<DIV style=\"position:relative; top:30px; left:0px; width:700px;height:200px\">
<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = \"urn:schemas-microsoft-com:time\" implementation = \"#default#time2\" declareNamespace />
<DIV align=center><DIV id=t3 style=\"FILTER: shadow(color=#3f4029, strength=29); WIDTH: 100%\"> <img src=\"http://media.imhb.cn/homepic/2007/12/26/20071226215655_61179.jpg\" width=201 height=151>
<t:animate targetElement=\"t3\" attributeName=\"filters.Shadow.strength\" from=\"80\" to=\"5\" begin=\"0\" dur=\"3\" end=\"\" autoreverse=\"false\" repeatcount=\"indefinite\"/>
</div>
</div>
</div>

陰影字的效果




<DIV style=\"position:relative; top:30px; left:0px; width:700px;\">
<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = \"urn:schemas-microsoft-com:time\" implementation = \"#default#time2\" declareNamespace />

<div id=z3 style=\"position: absolute; filter:Shadow(color=#edb4ef,direction=135,strength=29)\"><font face=楷書 color=#ff00ff size=7><b>陰影字的效果</b></font><br>

<t:animate targetElement=\"z3\" attributeName=\"filters.Shadow.strength\" from=\"25\" to=\"0\" begin=\"0\" dur=\"2\" end=\"\" autoreverse=\"false\" repeatcount=\"indefinite\"/>
</div></div></div>

該用戶從未簽到

鮮花(0) 雞蛋(0)
地板
 樓主| 發(fā)表于 2008-3-11 22:49 | 只看該作者

Alpha濾鏡效果




<DIV style=\"position:relative; top:30px; left:0px; width:700px;height:300px\">
<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = \"urn:schemas-microsoft-com:time\" implementation = \"#default#time2\" declareNamespace />
<DIV align=center>
<IMG id=t4 src=http://media.imhb.cn/homepic/2007/12/26/20071226215655_61179.jpg style=\"filter: Alpha(Opacity=100,Style=0)\" border=0>
<t:animate targetElement=\"t4\" attributeName=\"filters.Alpha.Opacity\" from=\"100\" to=\"0\" begin=\"0\" dur=\"4\" end=\"\" autoreverse=\"false\" repeatcount=\"indefinite\"/>
</div>
</div>

Alpha濾鏡效果




<DIV style=\"position:relative; top:30px; left:0px; width:700px;height:120px\">
<STYLE>.time {
BEHAVIOR: url(#default#time2)
filter: /*ALE*/ }
</STYLE>
<?import namespace = t urn = \"urn:schemas-microsoft-com:time\" implementation = \"#default#time2\" declareNamespace />
<DIV align=center><div id=z4 style=\"position: absolute; filter:filter: Alpha(Opacity=100,Style=0)\"><font face=華文新魏 color=#0000fa size=7><b>Alpha濾鏡效果</b></font><br>

<t:animate targetElement=\"z4\" attributeName=\"filters.Alpha.Opacity\" from=\"100\" to=\"0\" begin=\"0\" dur=\"4\" end=\"\" autoreverse=\"false\" repeatcount=\"indefinite\"/>
</div>
</div>
</div>
<br><br><br>


該用戶從未簽到

鮮花(0) 雞蛋(0)
5#
發(fā)表于 2008-3-11 22:55 | 只看該作者
兔兔真聰明!

該用戶從未簽到

鮮花(0) 雞蛋(0)
6#
發(fā)表于 2008-3-11 23:06 | 只看該作者
兔兔越研究越高深了,厲害。

簽到天數(shù): 17 天

[LV.4]偶爾看看III

鮮花(0) 雞蛋(0)
7#
發(fā)表于 2008-3-12 02:26 | 只看該作者
文字跟圖片都有了~來聽聽大師的講課了~

該用戶從未簽到

鮮花(0) 雞蛋(0)
8#
發(fā)表于 2008-3-12 08:29 | 只看該作者
新人剛來這里, 學習學習 這么好的效果

該用戶從未簽到

鮮花(0) 雞蛋(0)
9#
發(fā)表于 2008-3-12 10:57 | 只看該作者
謝謝兔兔哈 做帖子能用上的 辛苦了

該用戶從未簽到

鮮花(0) 雞蛋(0)
10#
發(fā)表于 2008-3-14 10:05 | 只看該作者
謝謝LZ 老師!這教程真不錯!
您需要登錄后才可以回帖 登錄 | 中文注冊

本版積分規(guī)則

關(guān)閉

站長推薦上一條 /1 下一條

網(wǎng)站地圖|小黑屋|Archiver|中畫網(wǎng) ( 蜀ICP備11021737號-2 )|網(wǎng)站地圖

GMT+8, 2025-6-23 06:23 , Processed in 0.075899 second(s), 21 queries , MemCached On.

上網(wǎng)要文明 發(fā)言要理性

Powered by Discuz! © 2008-2023 YinHuaBBS.CN

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 久久综合亚洲色HEZYO国产| 亚洲综合成人网在线观看| 亚洲综合图色40p| 亚洲人成依人成综合网| 狠狠色综合网站久久久久久久高清| 欧美一区二区三区久久综合| 亚洲VA欧美va国产va综合| 婷婷成人丁香五月综合激情| 亚洲狠狠婷婷综合久久久久| 色欲老女人人妻综合网| 亚洲欧美国产∧v精品综合网| 久久香蕉综合色一综合色88| 色777狠狠狠综合| 亚洲精品第一国产综合精品99| 欧美日韩综合一区在线观看| 久久狠狠色狠狠色综合| 精品综合久久久久久97超人| 国产成人综合洲欧美在线| 亚洲乱码中文字幕综合234| 亚洲国产成人久久综合区| 日韩亚洲国产综合久久久| 色综合视频一区二区三区| 欧美综合缴情五月丁香六月婷| 亚洲国产综合精品中文字幕| 国产亚洲精品精品国产亚洲综合 | 亚洲国产日韩综合久久精品| 久久香综合精品久久伊人| 国产成人99久久亚洲综合精品| 亚洲国产天堂久久综合| 中文字幕亚洲综合久久| 日韩欧美在线综合网另类| 色五月丁香六月欧美综合| 狠狠色丁香久久综合五月| 久久综合亚洲鲁鲁五月天| 狠狠色综合网站久久久久久久| 亚洲精品第一国产综合境外资源| 欧美一区二区三区久久综合| 婷婷综合缴情亚洲狠狠图片| 国产欧美日韩综合AⅤ天堂| 亚洲婷婷五月综合狠狠爱| 国产成人无码综合亚洲日韩|