html怎么去掉input边框

html怎么去掉input边框,第1张

html怎么去掉input边框

去掉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;" />

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

以上就是html怎么去掉input边框的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/690362.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-21
下一篇 2022-04-21

发表评论

登录后才能评论

评论列表(0条)

保存