CSS   发布时间:2022-04-17  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了css – input type =“image”在Chrome中显示不必要的边框,IE7中的链接断开大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我还没有找到解决方案

我试过一切

border:0;
border:none;
outline:none;

没有任何运气…而有趣的是IE7中破碎的链接图标与我的图像重叠.

任何建议?
link here

HTML(由WordPress生成)

<form id="searchform" method="get" action="http://eezzyweb.com/">
   <div>
  <input id="s" name="s" type="text" value="" size="32" tabindex="1"/>
  <input id="searchsubmit" name="searchsubmit" type="image" value="" tabindex="2"/>
   </div>
</form>

CSS

input#s{
position:relative;
width:245px;
height:28px;
border:0;
vertical-align:bottom;
BACkground:url(images/input-search-bkg.png) 0 0 no-repeat;
}

#searchsubmit {
display:inline-block;
BACkground:url(images/submit-bkg.png) 0 0 no-repeat;
width:30px;
height:30px;
border:0;
vertical-align:bottom;
}

Firefox和Opera渲染图像按钮确定,但在Chrome和Safari中,我会看到灰色边框.
IE 7和8在我的图像上添加一个符号(破坏的图标?)…我很难过.

解决方法

您正在使用图像作为背景.为什么不将其设置为按钮的src属性?
<input src="images/submit-bkg.png" id="searchsubmit" name="searchsubmit" type="image" value="" tabindex="2"/>

当您将类型设置为图像时,输入还需要一个src属性.

http://www.w3.org/TR/html401/interact/forms.html#adef-srchttp://www.w3.org/TR/html401/interact/forms.html#h-17.4.1

大佬总结

以上是大佬教程为你收集整理的css – input type =“image”在Chrome中显示不必要的边框,IE7中的链接断开全部内容,希望文章能够帮你解决css – input type =“image”在Chrome中显示不必要的边框,IE7中的链接断开所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。