首页前端开发JavaScripthtml怎么去掉input边框

html怎么去掉input边框

时间2024-01-29 18:56:02发布访客分类JavaScript浏览473
导读:收集整理的这篇文章主要介绍了html怎么去掉input边框,觉得挺不错的,现在分享给大家,也给大家做个参考。去掉input边框的方法:1、使用style属性设置“border: 0;”样式;2、使用style属性设置“border-styl...
收集整理的这篇文章主要介绍了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边框的详细内容,更多请关注其它相关文章!

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!

htmlinput

若转载请注明出处: html怎么去掉input边框
本文地址: https://pptw.com/jishu/591468.html
html怎么设置元素不可见 html怎么设置不透明度

游客 回复需填写必要信息