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

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

WBOY
WBOYOriginal
2016-06-24 11:50:071201Durchsuche

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>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn