?? css0513.htm
字號:
<html>
<head>
<title>洪恩在線 - CSS教程</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/pub/css/home.css">
<link rel="stylesheet" href="/pc/homepage/homepage.css">
<meta name="keywords" content="電腦樂園,電腦,樂園,交互教程,交互,教程,教育">
</head>
<body bgcolor="white" text="black" topmargin="10" leftmargin="0" marginwidth="0" marginheight="10">
<!--頂部開始-->
<script language="Javascript" src="/pub/js/head.js"></script>
<!--頂部結束-->
<table width="760" height="20" border=0 cellspacing="0" cellpadding="0" align="center">
<tr>
<td height=20 class="p1" bgcolor="#E8E8E8" align="left"><img src="/pc/img/blank.gif" width="12" height="8"><font color="#FF9966">當前位置</font>:<a href="/default.htm" class="under">洪恩在線</a>
-> <a href="/pc/index.htm" class="under">電腦樂園</a> -> CSS教程</td>
</tr>
</table>
<table width="760" border=0 cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="15"></td>
</tr>
</table>
<table width="760" cellspacing="0" border=0 cellpadding="0" align="center">
<tr>
<td width="145" valign="top" bgcolor="#E8E8E8" align="left" style="color:blue" class="p1" height="123">
<br>
<table width="145" border="0" cellspacing="0" cellpadding="0" bordercolor="#F8AC0E" height="20">
<tr bgcolor="000099" valign="middle">
<td width="115" align="center" class="p2"><b><font color="#FFFFFF">CSS教程</font></b></td>
<td height="20" bgcolor="#E8E8E8" width="13"><img src="/pc/img/title_00.gif" width="13" height="20"></td>
<td height="20" bgcolor="#E8E8E8" width="17"> </td>
</tr>
</table>
<p class="p1" style="line-height:17pt" align="left"> <font color="#CC3399">→</font>
<a href="css0101.htm">CSS快速入門</a><br>
<font color="#CC3399">→</font> <a href="css0201.htm">怎樣編寫CSS</a><br>
<font color="#CC3399">→</font> <a href="css0301.htm">CSS屬性</a><br>
<font color="#CC3399">→</font> <a href="css0401.htm">CSS定位</a><br>
<font color="#CC3399">→</font> CSS濾鏡<br>
1.<a href="css0501.htm">概述</a><br>
2.<a href="css0502.htm">Alpha屬性</a><br>
3.<a href="css0503.htm">Blur屬性</a><br>
4.<a href="css0505.htm">Chroma屬性</a><br>
5.<a href="css0506.htm">Dropshadow屬性</a><br>
6.<a href="css0507.htm">Fliph、Fliv屬性</a><br>
7.<a href="css0508.htm">Gray屬性</a><br>
8.<a href="css0309.htm">Glow屬性</a><br>
9.<a href="css0510.htm">Invert屬性</a><br>
10.<a href="css0511.htm">Mask屬性</a><br>
11.<a href="css0512.htm">Shadow屬性</a><br>
12.Wave屬性<br>
13.<a href="css0514.htm">Xray屬性</a> <br>
<br>
</p>
<p align="center" class=p1><a href=/pc/bin/msg.pl?file_id=k_css target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="請您留言" border="0"><br> 談談您的看法</a>
<br>
<script language="javascript">
speak_num="za"
</script>
<script language="javascript" src=/pc/var/pc_k_css.js>
</script>
<script language="javascript">
var num=0
if (!isNaN(speak_num)){
num=speak_num;
}
else{
num=0
}
document.writeln ("已有")
document.writeln (num)
document.writeln ("條發言")
</script>
</p>
<p class="p1" style="line-height:17pt" align="left"> </p>
</td>
<td width=1 bgcolor=#0586D7 height="123"><img src="/pc/img/blank.gif" width="1" height="1">
</td><td width=15 background="/pc/img/line.gif"><p> </p></td>
<td valign="top" background="/pc/img/line.gif" width="584" height="123" class="p2">
<p align="center"><b><span class="p3"><br>
<font color="#3366CC">五、CSS濾鏡</font></span></b></p>
<p align="right" class="p1"> </p>
<hr color=blue size=1>
<p class="p2" style="line-height:17pt"> <b><font color="336633">12、Wave屬性</font></b>
</p>
<p class="p2" style="line-height:17pt"> Wave屬性用來把對象按照垂直的波紋樣式打亂。它的表達式如下:
</p>
<p class="p2" style="line-height:17pt"> <font color="006666">Filter:Wave(Add=True(False),Freq=頻率,LightStrength=增強光效,<br>
Phase=偏移量,Strength=強度) </font> </p>
<p class="p2" style="line-height:17pt"> 我們看到Wave屬性的表達式還是比較復雜的,它一共有五個參數。Add參數有兩個參數值:True代表把對象按照波紋樣式打亂;False代表不打亂;<br>
Freq參數指生成波紋的頻率,也就是指定在對象上共需要產生多少個完整的波紋。 LightStrength參數是為了使生成的波紋增強光的效果。參數值可以從0到100。
Phase參數用來設置正弦波開始的偏移量。這個值的通用值為0,它的可變范圍為從0到100。這個值代表開始時的偏移量占波長的百分比。比如該值為25,代表正弦波從90度(360*25%)的方向開始。
<br>
說了一大堆,我們還是先看一個實例吧。比如下面這幅圖片(點擊可放大):</p>
<p align="center"><a href="img/css052.gif" target="_blank"><img src="img/css0521.gif" width="93" height="91" border="0" alt="原圖"></a></p>
<p class="p2" style="line-height:17pt"> 下面我們對上面這個頁面加上Wave效果,代碼如下:</p>
<p class="p2" style="line-height:17pt"> <font color="006666"><html><br>
<head> <br>
<title> wave css</title> <br>
<style></font><font color="CC33CC">//*定義CSS 樣式開始*//</font> <br>
<font color="006666"><!-- <br>
.leaf{position:absolute;top:10;width:300;<br>
filter:wave(add=true,freq=3,lightstrength=100,<br>
phase=45,strength=20);}</font> <br>
<font color="CC33CC">//*設置leaf類的樣式,絕對定位,wave屬性,產生3個波紋, 光強為100,波紋<br>
從162度(360*45%)開始,振幅為20*// </font><br>
<font color="006666">img{position:absolute;top:110;left:40;<br>
filter:wave(add=true,freq=3,lightstrength=100,<br>
phase=25,strength=5);}</font> <br>
<font color="CC33CC">//*設置IMG的樣式,絕對定位,wave屬性,產生3個波紋,光強為100,波紋從<br>
90度開始,振幅為5*//</font> <br>
<font color="006666">--> <br>
</style> <br>
</head> <br>
<body> <br>
<div class=“wave”></font><font color="CC33CC">//*定義DIV區域內為Wave類*//</font>
<br>
<font color="006666"><p style=“font-family:lucida handwriting; <br>
font-size=72pt; font-weight:bold;<br>
color:rgb(189,1,64);”>Leaf</p></font> <br>
<font color="CC33CC">//*設置字體名稱、大小、粗細、顏色*//</font> <br>
<font color="006666"></div> <br>
<p><img src=“ss01044.jpg”></p></font> <font color="CC33CC">//*導入圖片*//</font>
<br>
<font color="006666"></body> <br>
</html></font></p>
<p class="p2" style="line-height:17pt"> 這段代碼實現的效果如下圖:</p>
<p align="center"><img src="img/css051.gif" width="316" height="286" border="0" alt="wave效果圖1"></p>
<p class="p2" style="line-height:17pt"> 如果把Wave的參數隨便做一下改動,就會達到多種效果,請看另外一種效果:(如下圖):</p>
<p align="center"><img src="img/css050.gif" width="305" height="277" border="0" alt="wave效果圖2"></p>
<p class="p2" style="line-height:17pt"> 其實這種效果只是增大了freq參數的值,減小了Strength、LightStrength的值就可以了。您也可以多試試,改變其他的參數值,還可以達到許多不同的效果來。
<br>
本節主要講述了Wave屬性的應用,下一節將向您介紹Xray屬性。 </p>
<hr color=blue size=1>
<p class="p1" align="right"><a href="css0512.htm">上一節</a> <a href="css0514.htm">下一節</a> </p>
<p> </p>
<p align="center" class=p2><a href=/pc/bin/msg.pl?file_id=k_css target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="請您留言" border="0"><br> 談談您的看法</a>
<script language="javascript">
speak_num="za"
</script>
<script language="javascript" src=/pc/var/pc_k_css.js>
</script>
<script language="javascript">
var num=0
if (!isNaN(speak_num)){
num=speak_num;
}
else{
num=0
}
document.writeln ("已有")
document.writeln (num)
document.writeln ("條發言")
</script>
</p>
<p> </p>
</td>
<td width=15 background="/pc/img/line.gif"><p> </p></td>
</tr>
</table>
<!--底部開始-->
<script language="Javascript" src="/pub/js/foot.js"></script>
<!--底部結束-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -