timecontrol.htm
来自「网页颜色渐变,可实现网页中背景色的渐变效果」· HTM 代码 · 共 46 行
HTM
46 行
<html>
<head>
<title> time control </title>
<script>
<!--
function init() {
makeflash(bob)
setinterval("fred.filters.alpha.opacity =
(fred.filters.alpha.opacity+5)%101",100)
setinterval("foo(dave)",100)
}
var delta = 5function foo(obj) {
if ((obj.filters.alpha.opacity + delta >100)
|| (obj.filters.alpha.opacity + delta <0))
delta = -delta
obj.filters.alpha.opacity +=delta
}
function makeflash(obj) {
obj.flashtimer=
setinterval("bob.filters.glow.enabled
=!bob.filters.glow.enabled",1000)
}
function stopflash(obj) {
clearinterval(obj.flashtimer)
}
-->
</script>
</head>
<body onload="init()">
<div id=bob style="width:50%;
filter:glow(color=#faf900,strength=2,enabled=0);"
onclick="stopflash(this)">
<h1>here is some text</h1>
</div>
<div id=fred style="width:50%;filter:alpha(opacity=100);">
<h1>here is some text</h1>
</div>
<div id=dave style="width:50%;filter:alpha(opacity=50);color:blue">
<h1>here is some text</h1>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?