trans.htm

来自「网页颜色渐变,可实现网页中背景色的渐变效果」· HTM 代码 · 共 45 行

HTM
45
字号
<html>
<head>
<script language="JavaScript">
//滤镜应用的步骤
function startTrans()
{
window.defaultStatus=SampleID.filters.blendTrans.status;

//指定应用混合转换滤镜
SampleID.filters.blendTrans.Apply();

//转换后的图像文件名称
SampleID.src = "ss01093.jpg";

//开始执行混合滤镜
SampleID.filters.blendTrans.Play();
}

//滤镜结束时, 显示讯息对话框
function finishTrans()
{
if (SampleID.filters.blendTrans.Status == 0) alert("滤镜展示完毕");
}

function doTrans()
{
theImg.filters.item(0).Apply();
theImg.src="ss01093.jpg";
theImg.filters.item(0).Play();
}
</script></head>

<body bgcolor="#FFFFFF">

<img ID="SampleID" src="ss01094.jpg"
style=" filter:blendTrans(duration=2)" onclick="startTrans()"
onFilterChange="finishTrans()" width="225" height="180">

<img ID="theImg" src="ss01094.jpg"
style="filter:revealTrans(Duration=3, Transition=23)" onClick="doTrans()"
onFilterChange="finishTrans()" width="225" height="180">

</body>
</html> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?