kingchan

css input 如何去掉点击后出现的边框:css文件里加:*:focus { outline: none; } 或 input {outline:none;}

去边框的方法如下

方法1:

   <input type=text value=swerwdfwe style="border-style:none">

方法2:

    给input设置border:none;但在iE6下不行,还有边。应该将 border:none; 换成border:0; 这是ie6 的兼容性问题

    或者<input type="text" name="sample" border="0"/>

方法3:

   以div放置span和input显示相同的内容,平时显示span,隐藏input。单击span时显示input隐藏span,input 失去焦点时隐藏input,并把input的value填写到span,并显示span(简单来说,就是使用span替代input---当然同理可以使用div或其它方式替代)

分类:

技术点:

相关文章:

  • 2021-12-07
  • 2021-09-02
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-12-01
猜你喜欢
  • 2021-12-14
  • 2021-07-26
  • 2021-12-20
  • 2022-01-24
  • 2021-12-04
  • 2021-12-14
相关资源
相似解决方案