Javascript通过转换更改innerHTML

时间:2013-01-20 17:17:39

标签: javascript hover transition innerhtml

我有这个功能,当某个其他div悬停时,这个文本会显示在某个div上:

    function description(x){
    if(x=="tabuweb"){
        document.getElementById("description_box").innerHTML = "TabuWeb is a game designed for primary school children " +
                "to learn mathematics<br>" +
                "The main goal of the game is to get to the finish line by answering math questions<br>" +
                "Give it a try!";
    }
    if(x=="squares"){
        document.getElementById("description_box").innerHTML = "Squares is a maze game that focus on memory<br>" +
                "Click the squares around the white one. You must find a route to the blue square<br>" +
                "It's all about trial and error<br>"+
                "Good Luck!";
    }
}

这是在我的网页上(cmfproject),如果你将我在那里的两场比赛徘徊。

问题是:如何使文字显得平滑,就像悬停在图像上的效果更大,或者不是立即弹出那里?

0 个答案:

没有答案