1

我有这个功能,当某个其他 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 ) 上,如果您将鼠标悬停在我那里的两个游戏。

问题是:如何使该文本看起来像图像上的悬停效果一样平滑以使其更大,或者不是立即弹出那里的东西?

4

0 回答 0