我做错了什么? CSS 输入类型文件并提交
What I am do wrong? CSS input type file and submit
我做错了什么?为什么两个按钮不在一行?为什么提交按钮的顶部比文件按钮有 1 px 的间隙。
我正在使用 Google Chrome 桌面。在桌面浏览器中,这不好。在移动 Google chrome 浏览器中,这很好看。为什么?我必须写在CSS才能在其他浏览器中看到它好看。
<input type="file"><input type="submit"value="SUBMIT">
*
{
margin:0;
padding:0;
}
input[type=file],input[type=submit]
{
background:#ff0;
border:1px solid #f00;
padding:4px;
height:20px;
line-height:20px;
width:50px;
}
input[type=submit]
{
height:30px;
line-height:20px;
}
This is
谢谢
只需在第二个按钮上设置垂直对齐:
vertical-align: top
这是更新后的 jsfiddle:
http://jsfiddle.net/ddwpw2ej/4/
input[type=file],input[type=submit]
{
background:#ff0;
border:1px solid #f00;
padding:4px;
height:20px;
line-height:20px;
width:50px;
}
input[type=submit]
{
height:30px;
line-height:20px;
vartical-align:top;
}
试试这个....
我做错了什么?为什么两个按钮不在一行?为什么提交按钮的顶部比文件按钮有 1 px 的间隙。
我正在使用 Google Chrome 桌面。在桌面浏览器中,这不好。在移动 Google chrome 浏览器中,这很好看。为什么?我必须写在CSS才能在其他浏览器中看到它好看。
<input type="file"><input type="submit"value="SUBMIT">
*
{
margin:0;
padding:0;
}
input[type=file],input[type=submit]
{
background:#ff0;
border:1px solid #f00;
padding:4px;
height:20px;
line-height:20px;
width:50px;
}
input[type=submit]
{
height:30px;
line-height:20px;
}
This is 谢谢
只需在第二个按钮上设置垂直对齐:
vertical-align: top
这是更新后的 jsfiddle: http://jsfiddle.net/ddwpw2ej/4/
input[type=file],input[type=submit]
{
background:#ff0;
border:1px solid #f00;
padding:4px;
height:20px;
line-height:20px;
width:50px;
}
input[type=submit]
{
height:30px;
line-height:20px;
vartical-align:top;
}
试试这个....