改变图片链接的颜色?
问题描述:
(对不起,如果答案很明显,我是html的新手)
因此有一种方法可以改变图片链接的颜色过度?图像为1纯色。
目前我的代码:
(sorry if the answer is obvious, i'm new to html)
So is there a way to change the colour of a picture link when its hovered over? The image is 1 solid colour.
My code at the moment:
<img border="0" alt="twitter" src="twitterlogo.png" width="25" height="22"
答
如果我理解得很好你想在你悬停时改变图像的边框颜色它。我建议你将你的元素包含在div中,添加一个类名,然后设置你的类的样式。
.image img {
border:1px solid transparent;
}
.image:悬停img {
border-color:red;
}
If I understood well u want to change the border color of the image when u hover on it. I suggest u to include ur elements into a div , add a class name and then style ur class.
.image img{
border: 1px solid transparent;
}
.image:hover img{
border-color: red;
}