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; }
<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>