***图形特效***打雷喽 下雨收衣服呀~~~~~ (请改图片路径)
把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中
<style>
.mainbody {
position: absolute;
top:100px;
left:260px;
width:300px;
font-family:arial;
font-size:12pt;
color:ffffff;
}
.soundpic {
position: absolute;
top:-400px;
left:-400px;
}
a {
color:ff0000;
text-decoration:underline overline;
}
</style>
第二步:把如下代码加入到<body>区域中
<script>
<!-- beginning of javascript -
var x,y,i
var shakestrength=30
var i=shakestrength
var vorzeichen=1
function showsoundpic() {
if (document.all) {
document.all.soundgif1.style.postop=y-100
document.all.soundgif1.style.posleft=x
shakesound()
}
if (document.layers) {
document.soundgif1.top=y-100
document.soundgif1.left=x
shakesound()
}
}
function shakesound() {
if (document.all) {
if (i > 0) {
document.all.soundgif1.style.postop+=i*vorzeichen
document.all.soundgif1.style.posleft+=i*vorzeichen
vorzeichen=vorzeichen*(-1)
i--
var timer=settimeout("shakesound()",50)
}
else {
document.all.soundgif1.style.postop=-400
document.all.soundgif1.style.posleft=-400
i=shakestrength
cleartimeout(timer)
}
}
if (document.layers) {
if (i > 0) {
document.soundgif1.top+=i*vorzeichen
document.soundgif1.left+=i*vorzeichen
vorzeichen=vorzeichen*(-1)
i--
var timer=settimeout("shakesound()",50)
}
else {
document.soundgif1.top=-400
document.soundgif1.left=-400
i=shakestrength
cleartimeout(timer)
}
}
}
function makesound(soundobj){
showsoundpic()
var thissound= eval("document."+soundobj)
thissound.play()
}
function handlermm(e){
x = (document.layers) ? e.pagex : event.clientx
y = (document.layers) ? e.pagey : event.clienty
}
if (document.layers){
document.captureevents(event.mousemove);
}
document.onmousemove = handlermm;
// - end of javascript - -->
</script>
<div class=soundpic id=soundgif1><img height=300
src="../wytx/images/75/flash1611.gif" width=400> http://code.ik8.com/html/../wytx/images/75/flash1611.gif</div>
<div class=mainbody id=mainbody style="left: 265px; top: 17px"><a href="link.htm"
onmouseover="makesound('sound1')" target=_blank>鼠标移过来试试</a> </div>
<embed height=128 hidden=true name=sound1 src=../wytx/images/75/thunder1611.au width=128
mastersound autostart="false"></embed>
--------------------------------------
拥有三人行论坛管理系列软件,一个人就可以管理一个论坛的更新维护。还能使您的论坛有千人在线的真实火暴效果,让您不在为论坛因没有人气而留不住会员而烦恼,使您的论坛早日成为一流的论坛。详情请登陆网站:http://www.cnsrx.cn 三人行论坛管理软件,站长必备的专业好工具。(您使用的是免费版本,购买收费版本后,将不带广告。业务QQ:247216 44985227)
页:
[1]