?? css0512.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>
<!--頂部結(jié)束-->
<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">當(dāng)前位置</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.Shadow屬性<br>
12.<a href="css0513.htm">Wave屬性</a><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> 談?wù)勀目捶?lt;/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 ("條發(fā)言")
</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">11、Shadow屬性</font></b>
</p>
<p class="p2" style="line-height:17pt"> Shadow屬性可以在指定的方向建立物體的投影。它的表達(dá)式是這樣的:</p>
<p class="p2" style="line-height:17pt"> <font color="006666">Filter:Shadow(Color=color,Direction=direction)
</font> </p>
<p class="p2" style="line-height:17pt"> 在這里,Shadow有兩個參數(shù)值:Color參數(shù)用來指定投影的顏色;Direction參數(shù)用來指定投影的方向。<br>
這里說的方向與我們在第二節(jié)Blur屬性中提到的“方向與角度的關(guān)系”是一樣的。 也許您會問,前面講到的Dropshadow屬性和Shadow屬性有什么不同嗎?
<br>
光說的話,您恐怕還難以理解,讓我們看一看分別利用這兩個屬性做出來的效果有什么不同(見下圖):</p>
<p align="center"><img src="img/css048.gif" width="191" height="157" border="0" alt="shadow效果圖"> <img src="img/css049.gif" width="199" height="149" border="0" alt="dropshadow效果圖"></p>
<p class="p2" style="line-height:17pt"> <font color="#FF0033">Shadow效果</font> <font color="FF0033">Dropshadow效果</font></p>
<p class="p2" style="line-height:17pt"> 這樣一對比,就可以很明顯的看出兩者的不同。<br>
Shadow屬性可以在任意角度進(jìn)行投射陰影,Dropshadow屬性實(shí)際上是用偏移來定義陰影的。所以,看上去左圖的文字和陰影就像是一體的,而右圖的文字就像脫離了陰影一樣。<br>
本例的代碼如下:</p>
<p class="p2" style="line-height:17pt"> <font color="006666"><html><br>
<head> <br>
<title> shadow</title> <br>
<style></font><font color="CC33CC">//*開始設(shè)置CSS樣式*//</font> <br>
<font color="006666"><!-- <br>
.shadow{position:absolute;top:20;width:300;<br>
filter:shadow(color=#cc66ff,direction=225);}</font> <br>
<font color="CC33CC">//*定義Shadow類的樣式,絕對定位,Shadow屬性,陰影顏色、投影方向*//</font><br>
<font color="006666">.dropshadow{position:absolute;top:180;width:300;<br>
filter:dropshadow(color=#cc66ff,offx=10,offy=10,positive=1);}</font>
<br>
<font color="CC33CC">//*設(shè)置Dropshadow類的樣式,樣式與Shadow類相似, 不同的是濾鏡用了<br>
Dropshadow屬性,設(shè)置X軸和Y軸的偏移量*// </font><br>
<font color="006666">--> <br>
</style> <br>
</head> <br>
<body> <br>
<div class=“shadow”></font><font color="CC33CC">//*區(qū)域內(nèi)為Shadow類*//</font>
<br>
<font color="006666"><p style=“font-family:bailey;font-size:48pt;
<br>
font-weight:bold;color:#FF9900;”> <br>
Hongen Online</p></font><font color="CC33CC">//*定義字體名稱、大小、粗細(xì)、前景色*//
</font><br>
<font color="006666"></div> <br>
<div class=“dropshadow”></font><font color="CC33CC">//*區(qū)域內(nèi)為Dropshadow類*//</font>
<br>
<font color="006666"><p style=“font-family:bailey;font-size:48pt;
<br>
font-weight:bold;color:#FF9900;”> <br>
Hongen Online</p></font><font color="CC33CC">//*定義字體樣式與Shadow類的一樣*//</font>
<br>
<font color="006666"></div> <br>
</body> <br>
</html></font></p>
<p class="p2" style="line-height:17pt"> 本節(jié)講述了Shadow屬性的應(yīng)用,下一節(jié)將向您介紹Wave(波紋)屬性。
</p>
<hr color=blue size=1>
<p class="p1" align="right"><a href="css0511.htm">上一節(jié)</a> <a href="css0513.htm">下一節(jié)</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> 談?wù)勀目捶?lt;/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 ("條發(fā)言")
</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>
<!--底部結(jié)束-->
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -