去掉input边框的方法:1、使用style属性设置“border: 0;”样式;2、使用style属性设置“border-style: none;”样式;3、使用style属性设置“border: transparent;”样式。
本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。
这里有一个HTML文档,有两个input输入框
<!doctype html> <html> <head> <meta charset="UTF-8"> <style type="text/css"> input{ background-color: #FFC0CB; } </style> </head> <body> <input type="text" /><br /> <input type="text" /> </body> </html>
可以看出input有边框,那么如果要想去除input的边框,要怎么做?下面介绍几种方法。
方法1:在input元素中使用style属性设置border: 0;
样式
<input type="text" /><br /> <input type="text" style="border: 0;" />
方法2:在input元素中使用style属性设置border-style: none;
样式
<input type="text" /><br /> <input type="text" style="border-style: none;" />
方法3:在input元素中使用style属性设置border: transparent;
样式
<input type="text" /><br /> <input type="text" style="border: transparent;" />
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。