+ -
当前位置:首页 → 问答吧 → 在input中嵌入图片,怎么在firefox中边框就变了?

在input中嵌入图片,怎么在firefox中边框就变了?

时间:2011-08-21

来源:互联网

如何保持边框不变,而嵌入图片呀?

作者: w3svc   发布时间: 2011-08-21

引用楼主 w3svc 的回复:
如何保持边框不变,而嵌入图片呀?


把代码发上来~·

作者: MuBeiBei   发布时间: 2011-08-21

<input style="background-image: url(http://images.51job.com/im/my_history/key_search.gif);background-repeat: no-repeat;" ><br>
<input>


在firefox中,叫图片,和不加图片边框不一样

作者: w3svc   发布时间: 2011-08-21

HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title></title>
  
  </head>
  <body>
      <input style="background-image: url(http://images.51job.com/im/my_history/key_search.gif);background-repeat: no-repeat; border:1px solid  #333;" ><br><br>
<input style=" border:1px solid  #333;">


  </body>
</html>


这样都给input标签一个border样式,统一一下就好了~·

作者: MuBeiBei   发布时间: 2011-08-21

有没有其他办法呀?因为这是生成的代码,希望不要涉及到设置border的情况,因为还有其它代码加进来

作者: w3svc   发布时间: 2011-08-21

好像高度也变了,什么原因呀?

作者: w3svc   发布时间: 2011-08-21

热门下载

更多