所属分类:web前端开发
去掉input边框的方法:1、使用style属性设置“border: 0;”样式;2、使用style属性设置“border-style: none;”样式;3、使用style属性设置“border: transparent;”样式。
前端(vue)入门到精通课程:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用
本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。
这里有一个HTML文档,有两个input输入框
123456789101112131415 <!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;
样式
12 <
input
type
=
"text"
/><
br
/>
<
input
type
=
"text"
style
=
"border: 0;"
/>
登录后复制
方法2:在input元素中使用style属性设置border-style: none;
样式
12 <
input
type
=
"text"
/><
br
/>
<
input
type
=
"text"
style
=
"border-style: none;"
/>
登录后复制
方法3:在input元素中使用style属性设置border: transparent;
样式
12 <
input
type
=
"text"
/><
br
/>
<
input
type
=
"text"
style
=
"border: transparent;"
/>
登录后复制
推荐教程:《html视频教程》
以上就是html怎么去掉input边框的详细内容,更多请关注zzsucai.com其它相关文章!