Home  >  Article  >  Web Front-end  >  css相关,鼠标点击<input>输入域后出现有颜色的边框_html/css_WEB-ITnose

css相关,鼠标点击<input>输入域后出现有颜色的边框_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:50:071203browse

css相关,鼠标点击输入域后出现有颜色的边框,如果使用css,将这个鼠标点击输入域后产生的边框去掉呢?下面是截图

鼠标未点击前:


鼠标点击后:


  根据大家的办法实现不了的,即使可以改变颜色,但是那条有颜色的线还是无法消除。下面是我的html和css代码:  html:  <input type="text" name="content" id="input_box">  css:  #input_box{  border-width:0;  border-color:white;  border-style:none;  background:none;  }  #input_box:focus{  border:0;  }
<p>用:focus伪类就可以实现</p>          <table>                        <tr>     <td>      <p class="sycode">       1      </p>      <p class="sycode">       2      </p>      <p class="sycode">       3      </p></td>     <td>      <p class="sycode">       <p class="sycode">        input:focus {       </p>       <p class="sycode">             outline : none ;       </p>       <p class="sycode">        }       </p>      </p></td>    </tr>            </table><p>如上,可以根据自己的具体需求更改颜色、像素</p><p>要想美观的话,可以根据设计风格,添加border-radius属性来增加边角圆角效果</p>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn