css清除input默認(rèn)樣式的方法是,將input的各個(gè)屬性的屬性值設(shè)置為none即可,例如【background:none;outline:none;border:none;】。
本文操作環(huán)境:windows10系統(tǒng)、css 3、thinkpad t480電腦。
如果我們要清除input的默認(rèn)樣式,那么我們可以直接將屬性值設(shè)置為none,例如:
input{ background:none; outline:none; border:none; }
如果input必須要有邊框,但需要去掉選中時(shí)的藍(lán)色框,則可以使用如下代碼:
input{ background:none; outline:none; border:1px solid #ccc; }input:focus{ border:none; }
相關(guān)視頻分享:css視頻教程