| 项目搜索 |
| |
|
代码片段库:
查看代码片段
浏览
| 提交新的代码片段
| 创建代码包
超酷的文字特效
|
类型:
Full Script |
类别:
HTML Manipulation
|
许可证:
GNU General Public License |
语言:
JavaScript
|
描述:
超酷的文字特效[特别推荐]
|
该代码片段的版本系列:
片段ID |
下载版本 |
提交时间 |
提交人 |
删除 |
4593 | 1.0 | 2003-10-13 21:06 | cbd001 | |
点击"下载版本"来下载该代码片段.
最新版本的代码片段: 1.0
超酷的文字特效[特别推荐][共2步]
====1、将以下代码加入HEML的<head></head>之间:
<script>
<!--//
var x,y
var timer
var i_fontsize=0
var step=0
var thisx,thisy
function handlerMM(e){
x = (document.layers) ? e.pageX : event.clientX
y = (document.layers) ? e.pageY : event.clientY
}
function ringup() {
if (document.all) {
thisx = x
thisy = y
ringup2()
}
}
function ringup2() {
if (i_fontsize<=1000) {
document.all.ring.style.fontSize=i_fontsize
document.all.ring.style.color="rgb(255,"+Math.floor(i_fontsize/6)+","+Math.floor(i_fontsize/6)+")"
document.all.ring.style.posLeft=thisx-(Math.floor(i_fontsize/3))
document.all.ring.style.posTop=thisy-(Math.floor(i_fontsize/1.4))
step+=4
i_fontsize+=step
timer=setTimeout("ringup(2)",50)
}
else {
clearTimeout(timer)
i_fontsize=0
step=0
document.all.ring.style.posTop=-10000
}
}
document.onmousemove = handlerMM;
//-->
</script>
<style>
.ringstyle {
position:absolute;
visibility:visible;
top:-50px;
font-size:5pt;
font-family:Verdana;
color:FF0000
}
.explain {
position:absolute;
top:80px;
left:40px;
width:300px;
color:000000;
text-align:center;
font-size:20pt;
font-family:Times;
}
</style>
====2、将以下代码加入HEML的<body></body之间>
<div id="ring" class="ringstyle">
<p><font color="#FF8080">:-)</font></p>
</div><div id="redirection" class="explain">
<p>移动你的鼠标到这里来看看<a target="_blank" onMouseOver="ringup()"
onclick="window.open('download.htm','dl','width=300,height=100,top=0')"
href="http://qdjacky.126.com">是不是很棒的效果</a></p>
</div>
如果您修改了一个代码片段并且觉得很应该让别人共享,您可以把这作为这个代码片段的最新版本提交上来. |
|