下載jQuery和使用它...
$(#'image need to be hovered').mouseover(function()
{
$(#'images need be be cahnged in this effect').attr('src','image path')
})
例如:給ID爲DIV作爲IMG1和需要改變的圖像是IMG1,IMG2,IMG3
考慮這個
$('#img1').mouseover(function()
{
$('#img1').attr('src','image path for hover image');
$('#img2').attr('src','image path for hover image');
$('#img3').attr('src','image path for hover image');
});
和鼠標移開
$('#img1').mouseout(function()
{
$('#img1').attr('src','image path for original image');
$('#img2').attr('src','image path for original image');
$('#img3').attr('src','image path for original image');
});
搜索 「水平手風琴的jquery」。僅供參考,這種問題並不適合SO規則 –