Gau*_*don 0 html javascript css jquery jquery-hover
我的代码(全窗启动).
我的JS代码:
$(document).ready(function () {
$("#play_buttton").hover(
function () {
$('#play_button').css({ "height": "240px", "width": "250px" });
},
function () {
$('#play_button').css({ "height": "225px", "width": "220px" });
}
);
});
Run Code Online (Sandbox Code Playgroud)
我认为这段代码必须创造问题.
问题:当我将鼠标悬停在图像上时(#play_button),没有任何反应,它的高度和宽度不会改变.任何人都可以告诉我如何解决这个问题.
谢谢.
事实play_button并非如此play_buttton
$(document).ready(function () {
$("#play_button").hover( // Here not play_buttton
function () {
$(this).css({ "height": "240px", "width": "250px" });
},
function () {
$(this).css({ "height": "225px", "width": "220px" });
}
);
});
Run Code Online (Sandbox Code Playgroud)
请参阅此示例FIDDLE.
你也.animate可以喜欢这个FIDDLE2