我是靠谱客的博主 鲜艳猫咪,这篇文章主要介绍html怎么去掉input边框,现在分享给大家,希望可以做个参考。

本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。

这里有一个HTML文档,有两个input输入框

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!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>
登录后复制

1.png

可以看出input有边框,那么如果要想去除input的边框,要怎么做?下面介绍几种方法。

方法1:在input元素中使用style属性设置border: 0;样式

复制代码
1
2
<input type="text" /><br /> <input type="text" style="border: 0;" />
登录后复制

2.png

方法2:在input元素中使用style属性设置border-style: none;样式

复制代码
1
2
<input type="text" /><br /> <input type="text" style="border-style: none;" />
登录后复制

3.png

方法3:在input元素中使用style属性设置border: transparent;样式

复制代码
1
2
<input type="text" /><br /> <input type="text" style="border: transparent;" />
登录后复制

4.png

推荐教程:《html视频教程》

以上就是html怎么去掉input边框的详细内容,更多请关注靠谱客其它相关文章!

最后

以上就是鲜艳猫咪最近收集整理的关于html怎么去掉input边框的全部内容,更多相关html怎么去掉input边框内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(126)

评论列表共有 0 条评论

立即
投稿
返回
顶部