Home > Web Front-end > HTML Tutorial > css related, a colored border appears after clicking the input field_html/css_WEB-ITnose

css related, a colored border appears after clicking the input field_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:50:07
Original
1248 people have browsed it

Related to css, a colored border appears after the mouse clicks on the input field. If you use css, how to remove the border generated after the mouse clicks on the input field? Below is the screenshot

Before the mouse is clicked:


After the mouse is clicked:


  根据大家的办法实现不了的,即使可以改变颜色,但是那条有颜色的线还是无法消除。下面是我的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;  }
Copy after login
<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>
Copy after login
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template