input标签默认是有边框(border)和背景色属性的。可以在CSS中加入border:none;(或者在html中加入style="border:none;")可以去掉边框。input标签在鼠标光标移到文本框时,会有黄色的边框。如果不需要可以在css属性中加input{outline:medium;}属性去掉,有时可能会遇到input无法去除边框这是由于outline参数导致的。下面本站为大家详细讲解HTML页面中去除掉input边框一下实现方案。
方法1:
html代码如下:
<input type=text" style="border-style:none">
方法2:
css样式代码如下:
.input-tags,.input-tags:focus { width: 455px; border: none; height: 25px; outline: none; box-shadow: 0 0 0; }
html代码如下:
<input type=text" class="input-tags">