1
我遇到了問題:/ 我收到了一個CSS thingy,使得懸停時的背景位置發生變化。但是,我在JavaScript中運行一個函數,改變懸停CSS的一個停止工作。JavaScript破壞CSS懸停
這是函數:
function tree() {
var boxfb = document.getElementById('fb_box');
var boxtw = document.getElementById('twitter_box');
var boxsun = document.getElementById('sun_box');
var boxtree = document.getElementById('tree_box');
var btn = document.getElementById('hbtr');
if(boxtree.style.visibility == "hidden") {
boxtw.style.visibility="hidden";
boxfb.style.visibility="hidden";
boxsun.style.visibility="hidden";
boxtree.style.visibility="visible";
btn.style.backgroundPosition="-150px -100px";
}
else {
boxtree.style.visibility="hidden";
btn.style.backgroundPosition="-150px 0";
}
}
住在http://enji.se(按下左上角的樹)
謝謝! :D <3 – 2011-05-14 23:48:15