Html 如何设置输入框每边的边框?
Html 如何设置输入框每边的边框?,html,css,forms,input,Html,Css,Forms,Input,输入框带有一个可设置为0的大纲。 然后它会在周围显示一个丑陋的边界 此边框也可以设置为none,使输入框没有边框 但是,我只想在输入框的顶部和底部添加边框,但无法完成。 有什么想法吗?将其应用于您的输入元素 input { border: 1px solid #000; /* this will give the input 1px black border all around */ border-left: 0 none; border-right: 0 none;
输入框
带有一个可设置为0
的大纲。
然后它会在周围显示一个丑陋的边界
此边框也可以设置为none
,使输入框没有边框
但是,我只想在输入框的顶部和底部添加边框,但无法完成。
有什么想法吗?将其应用于您的输入元素
input {
border: 1px solid #000; /* this will give the input 1px black border all around */
border-left: 0 none;
border-right: 0 none;
}
我应该这样做
或者,你也可以去
input {
border: 0; /* resets default border */
border-top: [your border styling];
border-bottom: [your border styling];
}
将其应用于输入元素
input {
border: 1px solid #000; /* this will give the input 1px black border all around */
border-left: 0 none;
border-right: 0 none;
}
我应该这样做
或者,你也可以去
input {
border: 0; /* resets default border */
border-top: [your border styling];
border-bottom: [your border styling];
}
将其应用于输入元素
input {
border: 1px solid #000; /* this will give the input 1px black border all around */
border-left: 0 none;
border-right: 0 none;
}
我应该这样做
或者,你也可以去
input {
border: 0; /* resets default border */
border-top: [your border styling];
border-bottom: [your border styling];
}
将其应用于输入元素
input {
border: 1px solid #000; /* this will give the input 1px black border all around */
border-left: 0 none;
border-right: 0 none;
}
我应该这样做
或者,你也可以去
input {
border: 0; /* resets default border */
border-top: [your border styling];
border-bottom: [your border styling];
}
如果要使用提供的边框,请执行此操作
input {
border-left:0px;
border-right:0px;
}
如果你不想那样,那就用
input {
border-top:1px solid red;
border-bottom:1px solid red;
border-left:0px;
border-right:0px;
}
如果要使用提供的边框,请执行此操作
input {
border-left:0px;
border-right:0px;
}
如果你不想那样,那就用
input {
border-top:1px solid red;
border-bottom:1px solid red;
border-left:0px;
border-right:0px;
}
如果要使用提供的边框,请执行此操作
input {
border-left:0px;
border-right:0px;
}
如果你不想那样,那就用
input {
border-top:1px solid red;
border-bottom:1px solid red;
border-left:0px;
border-right:0px;
}
如果要使用提供的边框,请执行此操作
input {
border-left:0px;
border-right:0px;
}
如果你不想那样,那就用
input {
border-top:1px solid red;
border-bottom:1px solid red;
border-left:0px;
border-right:0px;
}
除了边框,浏览器还添加了一个轮廓 你能行
textarea:focus, input:focus{
outline: 0;
}
甚至
*:focus {
outline: 0;
}
禁用此行
来源:除了边框,浏览器还添加了一个轮廓 你能行
textarea:focus, input:focus{
outline: 0;
}
甚至
*:focus {
outline: 0;
}
禁用此行
来源:除了边框,浏览器还添加了一个轮廓 你能行
textarea:focus, input:focus{
outline: 0;
}
甚至
*:focus {
outline: 0;
}
禁用此行
来源:除了边框,浏览器还添加了一个轮廓 你能行
textarea:focus, input:focus{
outline: 0;
}
甚至
*:focus {
outline: 0;
}
禁用此行
来源:谢谢@kevinMario!边框样式也可以调整吗?(如像素等)似乎什么都不起作用。设置border top和border bottom属性。边框样式是{实心、双色、虚线、虚线、脊线、凹槽、插入、开始}中的一种,试试看!谢谢@kevinMario!边框样式也可以调整吗?(如像素等)似乎什么都不起作用。设置border top和border bottom属性。边框样式是{实心、双色、虚线、虚线、脊线、凹槽、插入、开始}中的一种,试试看!谢谢@kevinMario!边框样式也可以调整吗?(如像素等)似乎什么都不起作用。设置border top和border bottom属性。边框样式是{实心、双色、虚线、虚线、脊线、凹槽、插入、开始}中的一种,试试看!谢谢@kevinMario!边框样式也可以调整吗?(如像素等)似乎什么都不起作用。设置border top和border bottom属性。边框样式是{实心、双色、虚线、虚线、脊线、凹槽、插入、开始}中的一种,试试看!