使用CSS悬停来显示图像 [英] using CSS hover to display an image

查看:64
本文介绍了使用CSS悬停来显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hola


i想出了如何在悬停时将图像显示在链接旁边,将其显示为块然后使用背景:url


div.menu a {

display:block;

}


div.menu a :hover {

background:url(images / menuhover.gif)left no-repeat;

}


(ps here是一个链接,如果你想看到它在行动......。
http:// ferncreekdesign .spiritserver.org


现在我想做的是在页面边缘有一系列缩略图,并使用悬停属性显示图像页面的中心,当我将鼠标悬停在各种缩略图上时,它会发生变化。


我说我会喜欢。 。 。这可能吗??

hola

i figured out how to make an image appear next to a link when hovering by displaying it as a block and then using background:url

div.menu a{
display:block;
}


div.menu a:hover{
background:url(images/menuhover.gif) left no-repeat;
}

(ps here is a link if you want to see it in action . . . )
http://ferncreekdesign.spiritserver.org

now what i would like to do is to have a series of thumbnails on the edge of the page and use the hover property to display an image in the center of the page, which will change as i hover over the various thumbnails.

i said i would LIKE . . . is this possible??

推荐答案

这将需要使用JavaScript,单独的HTML / CSS将无法处理这个问题。将帖子移到JavaScript论坛。


--Kevin
This will require the use of JavaScript, HTML/CSS alone will not be able to handle this. Moving post to JavaScript Forum.

--Kevin


创建一个获取新图像网址的函数。然后更改主图像的 src属性。
Create a function that takes the new images url. Then change the src attribute of the main image.


实际上,CSS可以做得很好。
Actually, CSS can do this quite well.


这篇关于使用CSS悬停来显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆