在1 html5网页上,我有一只半效果。 与此类似:
a:hover {
background: #EFEFEF;
}
我还有一份有链接的图像清单:
<a href="x">
<img src="images/y.png" />
</a>
在接手这些链接时,图像显示有一线EFEF-colored线。 我如何去除这一点?
它不是法令:强调,也干扰了婚礼。
在1 html5网页上,我有一只半效果。 与此类似:
a:hover {
background: #EFEFEF;
}
我还有一份有链接的图像清单:
<a href="x">
<img src="images/y.png" />
</a>
在接手这些链接时,图像显示有一线EFEF-colored线。 我如何去除这一点?
它不是法令:强调,也干扰了婚礼。
As an enhancement to Jonathan s answer, if you don t want the layout of the element to change, I d suggest turning the a
into an inline-block
as well as making the img
a block
.
a {display:inline-block}
a img {display:block}
That way, the a
will stay inline, and the text will keep its integrity. See jsFiddle.
你们看到白空间背景的颜色在形象下;如果你在形象后搬走白色空间,就应当放弃:
<a href="x">
<img src="images/y.png" /></a>
如果你的图像链接点与一个共同目录或网站,那么你实际上可以通过使用带有定期表达trick的特性选择者来选择。
a[href*="foo"]:hover {
background:transparent;
}
因此,从本质上来说,这将选择其母子的“foo”的所有要素。 平等签署前的星号是野心。 否则,它只能用“foo” href来选择这些要素。
我的猜测是,你所看到的界线是图像下(在案文基线上坐)的放大空间,以背景颜色填补。 Try text-align:底层<>/code>适用于图像本身,看看该线是否消失或转移到图像上。 如果它没有,可尝试
text-bottom
。
如果其中任何一个工程都存在,那么纵向统一就是问题,你可以通过在图像上添加一页相容的背景,并给出一些底层的dding(例如,0.15em
),同时将其与案文的底线(使用bottom
或text-bottom
)一致。
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...
<form><input type="file" name="first" onchange="jsFunction(2);"> <input type="file" name="second" onchange="jsFunction(3);"</form> Possible to pass just numbers to the js ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!