使用谷歌瀏覽器時(shí),當(dāng)鼠標(biāo)焦點(diǎn)在文本輸入框(input、textarea)時(shí),谷歌瀏覽器默認(rèn)會(huì)給它們加上邊框,但我們有時(shí)并不需要這邊框,所以要通過代碼去掉。

1、獲得焦點(diǎn)時(shí),默認(rèn)會(huì)出現(xiàn)邊框
復(fù)制內(nèi)容到剪貼板
2、在CSS中用下面的代碼可以去掉邊框:
復(fù)制內(nèi)容到剪貼板

3、如果需要,可以給元素增加邊框樣式: input,textarea:focus { outline:Blue Solid 4px; } ,但要先去掉:input,textarea:focus {outline: none;}


4、如果你想去掉所有默認(rèn)邊框可加入下面代碼:
復(fù)制內(nèi)容到剪貼板
新聞熱點(diǎn)
疑難解答
圖片精選