?? csstx13.htm
字號(hào):
<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="電腦樂園,電腦,樂園,交互教程,交互,教程,教育,網(wǎng)頁制作,CSS,特效,賞析">
</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="#000000"><font color="#FF9966">當(dāng)前位置</font>:<a href="/default.htm" class="under">洪恩在線</a>
-> <a href="/pc/index.htm" class="under">電腦樂園</a> -> CSS特效賞析</font></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">
<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"> 1.<a href="csstx01.htm">動(dòng)態(tài)改變樣式</a><br>
2.<a href="csstx02.htm">動(dòng)態(tài)可視化效果</a><br>
3.<a href="csstx03.htm">動(dòng)態(tài)濾鏡顯示</a><br>
4.<a href="csstx04.htm">Blentrans屬性</a><br>
5.<a href="csstx05.htm">Revealtrans屬性</a><br>
6.<a href="csstx06.htm">動(dòng)態(tài)Glow屬性</a><br>
7.<a href="csstx07.htm">顯示和隱藏</a><br>
8.<a href="csstx08.htm">兼容兩種瀏覽器</a><br>
9.<a href="csstx09.htm">移動(dòng)對(duì)象</a><br>
10.<a href="csstx10.htm">對(duì)象的滑動(dòng)</a><br>
11.<a href="csstx11.htm">鍵盤控制對(duì)象</a><br>
12.<a href="csstx12.htm">鼠標(biāo)控制對(duì)象</a><br>
13.<a href="csstx13.htm">Clip屬性的應(yīng)用</a><br>
14.<a href="csstx14.htm">動(dòng)態(tài)文字變換</a><br>
15.動(dòng)態(tài)改變頁面樣式<br>
16.動(dòng)態(tài)時(shí)鐘控制<br>
17.倒計(jì)時(shí)<br>
18.動(dòng)態(tài)刷新<br>
</p>
<p align="center" class=p1> <a href=/pc/bin/msg.pl?file_id=k_csstx target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="請(qǐng)您留言" border="0"><br>
談?wù)勀目捶?lt;/a> <br>
<script language="javascript">
speak_num="za"
</script>
<script language="javascript" src=/pc/var/pc_k_csstx.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"> <a href="csstx12.htm">上一實(shí)例</a> <a href="csstx14.htm">下一實(shí)例</a> </p>
<hr color=blue size=1>
<p class="p2" style="line-height:17pt"> <b><font color="#336633">13、Clip屬性的應(yīng)用</font></b></p>
<p class="p2" style="line-height:17pt"><b><font color="#336633"> </font></b> 上一節(jié)說到了動(dòng)態(tài)可視區(qū)的調(diào)整,實(shí)際上就是Clip屬性的應(yīng)用。<br>
Clipping的中文解釋就是剪輯的意思,這個(gè)屬性決定了對(duì)象的哪個(gè)部位可以被看到。它不會(huì)改變?nèi)魏螌?duì)象的性質(zhì)。 <br>
Clipping 的區(qū)域是一個(gè)矩形, 而這個(gè)矩形的尺寸取決于于四個(gè)邊的位置。 <br>
這四個(gè)邊用 top, right, botton, left 來表示。 <br>
請(qǐng)注意:這四個(gè)邊的位置是相對(duì)于對(duì)象的而不是相對(duì)于窗口的。 <br>
Clip屬性的書寫格式是這樣的: </p>
<p class="p2" style="line-height:17pt"> <font color="#336633">Clip rect(top,right,bottom,left)</font></p>
<p class="p2" style="line-height:17pt"> 在這里,top,right,bottom,left的值都是以像素pixels為單位的。</p>
<p class="p2" style="line-height:17pt"><img src="img/csssl01.gif" width="280" height="185" align="left" hspace="20" alt="原圖" vspace="5">為了更好的理解相對(duì)于對(duì)象這個(gè)含義<br>
,我們看一個(gè)例子,比如左面是一幅<br>
285×185的圖片,我們對(duì)它加入下面這<br>
段代碼: </p>
<p class="p2" style="line-height:17pt"><font color="#336633">style="clip:rect(0,200,100,0)"<br>
</font></p>
<p class="p2" style="line-height:17pt">這段代碼使圖片將以200×100的形式顯 <br>
示。這是因?yàn)閞ect中規(guī)定的200,代表了圖片的右端距離是200pixels,也就 是圖片的寬度是200pixels;同理, 100定義的則是圖片的高度。這樣圖片就
好象被剪輯了一樣,將顯示成右下圖的樣子:</p>
<p class="p2" style="line-height:17pt"> <img src="img/csssl02.gif" style="clip:rect(-15,20,-15,20)" width="202" height="152" align="right" hspace="20" border="0" alt="clip后的圖片">
基本原理就介紹這么多,讓我們來看兩個(gè)例子<br>
,一個(gè)是靜態(tài)調(diào)整可視區(qū)域,一個(gè)是動(dòng)態(tài)調(diào)整。 </p>
<p class="p2" style="line-height:17pt"> 在這兩個(gè)例子中,您可以點(diǎn)擊對(duì)應(yīng)的鏈接,得<br>
到圖片四條邊的位置,可以點(diǎn)擊鏈接使圖片的可視<br>
區(qū)按照規(guī)定的范圍顯示,還有您可以點(diǎn)擊后,使圖<br>
片就像放電影一樣,慢慢的展開。<br>
<br>
哇,怎么這么多功能啊! <a href="sl/clip1.htm" target="_blank"><img src="img/link.gif" width="127" height="20" align="absmiddle" border="0" alt="鏈接"></a>看第一個(gè)例子吧。<a href="sl/clip2.htm" target="_blank"><img src="img/link.gif" width="127" height="20" align="absmiddle" border="0" alt="鏈接"></a>看第二個(gè)例子。</p>
<p class="p2" style="line-height:17pt"> 好了,本節(jié)介紹了Clip屬性的應(yīng)用實(shí)例,有關(guān)CSS-P的知識(shí)應(yīng)用講的差不多了,下<br>
一節(jié)我將向您介紹一個(gè)動(dòng)態(tài)字幕變換的例子。 </p>
<p class="p2" style="line-height:17pt"> </p>
<hr color=blue size=1>
<p class="p1" align="right" width="280" height="185"> <a href="csstx12.htm">上一實(shí)例</a> <a href="csstx14.htm">下一實(shí)例</a> </p>
<p> </p>
<p align="center" class=p2><a href=/pc/bin/msg.pl?file_id=k_csstx target="_blank"><img src="/pc/img/message.gif" width="64" height="54" alt="請(qǐng)您留言" border="0"><br>
談?wù)勀目捶?lt;/a>
<script language="javascript">
speak_num="za"
</script>
<script language="javascript" src=/pc/var/pc_k_csstx.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
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -