📄 csstx04.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="电脑乐园,电脑,乐园,交互教程,交互,教程,教育,网页制作,CSS,特效,赏析">
<style>
<!--
em{color:red;cursor:hand;font-size:14pt}
-->
</style>
</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="#000000"><font color="#FF9966">当前位置</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">动态改变样式</a><br>
2.<a href="csstx02.htm">动态可视化效果</a><br>
3.<a href="csstx03.htm">动态滤镜显示</a><br>
4.<a href="csstx04.htm">Blentrans属性</a><br>
5.<a href="csstx05.htm">Revealtrans属性</a><br>
6.<a href="csstx06.htm">动态Glow属性</a><br>
7.<a href="csstx07.htm">显示和隐藏</a><br>
8.<a href="csstx08.htm">兼容两种浏览器</a><br>
9.<a href="csstx09.htm">移动对象</a><br>
10.<a href="csstx10.htm">对象的滑动</a><br>
11.<a href="csstx11.htm">键盘控制对象</a><br>
12.<a href="csstx12.htm">鼠标控制对象</a><br>
13.<a href="csstx13.htm">Clip属性的应用</a><br>
14.<a href="csstx14.htm">动态文字变换</a><br>
15.动态改变页面样式<br>
16.动态时钟控制<br>
17.倒计时<br>
18.动态刷新<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="请您留言" border="0"><br>
谈谈您的看法</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 ("条发言")
</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="csstx03.htm">上一实例</a> <a href="csstx05.htm">下一实例</a> </p>
<hr color=blue size=1>
<p class="p2" style="line-height:17pt"> <font color="#336633"><b>4、Blentrans属性</b></font></p>
<p class="p2" style="line-height:17pt"> 本节介绍一种特效,它应用到的是CSS中的混合转换滤镜blendtrans。请您先看一下<br>
下面这个例子: </p>
<p class="p2" style="line-height:17pt"> 滤镜效果</p>
<p class="p2" style="line-height:17pt"> <strong> 使用方法</strong> <span id="text4" onClick="curobj=inner3;togglemultimedia()">
请单击<b><em>这里</em></b>使文字淡出,再次单击后可以使文字逐渐出现。 </span></p>
<div id="inner3" style="width:100%;color:red;filter:blendtrans(duration=3)">
<span id="text4" onClick="curobj=inner3;togglemultimedia()"> 我们为这段文字加上的逐渐淡出的多媒体效果。</span></div>
<p>
<script language="javascript">
<!--
var curobj;
function togglemultimedia(){
if (curobj.filters(0).status==2){
curobj.filters(0).stop();
if (curobj.style.visibility=="hidden")
curobj.style.visibility="visible";
else
curobj.style.visibility="hidden";
window.settimeout("togglemultimedia()",1);
}
curobj.filters(0).apply();
if (curobj.style.visibility=="hidden")
curobj.style.visibility="visible";
else
curobj.style.visibility="hidden";
curobj.filters(0).play();
}
-->
</script>
</p>
<p> 看到了吗?这是一种淡入淡出的效果。让我们来看一下而这种效果用到的转换属性<br>
blendtrans的语法:</p>
<p> <font color="#336633">Filter:BlendTrans(duration=淡入或淡出的时间,以秒作单位)</font></p>
<p> 我们看到了BlendTrans属性只有一个属性值duration,它指定了对象淡入淡出的时<br>
间。</p>
<p> 上面的例子的源代码如下所示:</p>
<p> <html><br>
<head> <br>
<title> dhtml</title> <br>
<style> <br>
<!-- <br>
em{color:red;cursor:hand;font-size:14pt} <br>
--> <br>
</style> </head> <br>
<body> <br>
<h1>滤镜效果</h1> <br>
<p><strong>使用方法</strong> <br>
<span id="text4" onclick="curobj=inner3;togglemultimedia()"> <br>
请单击<b><em style="color:red">这里</em></b>使文字淡出,<br>
再次单击后可以使文字逐渐出现。</p> <br>
<div id="inner3" style="width:100%;color:red; <br>
filter:blendtrans(duration=3)"><br>
<p> 我们为这段文字加上的逐渐淡出的多媒体效果。</span></p> </div>
<br>
<script language="javascript"> <br>
<!-- <br>
var curobj; <br>
function togglemultimedia(){ <br>
if (curobj.filters(0).status==2){ curobj.filters(0).stop(); <br>
if (curobj.style.visibility=="hidden")<br>
curobj.style.visibility="visible"; <br>
else curobj.style.visibility="hidden"; <br>
window.settimeout("togglemultimedia()",1); } <br>
curobj.filters(0).apply(); <br>
if (curobj.style.visibility=="hidden") <br>
curobj.style.visibility="visible"; <br>
else curobj.style.visibility="hidden"; curobj.filters(0).play(); }<br>
--> <br>
</script> </body> <br>
</html></p>
<p> 除了文字外,图片是不是也能实现这种混合效果呢?答案是肯定的。下一节将向您<br>
介绍图片的混合转换滤镜效果和显示转换滤镜效果。 </p>
<hr color=blue size=1>
<p class="p1" align="right" width="280" height="185"> <a href="csstx03.htm">上一实例</a> <a href="csstx05.htm">下一实例</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="请您留言" border="0"><br>
谈谈您的看法</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 ("条发言")
</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 + -