1

input file我对HTML5 标签有一个奇怪的问题。这是它的样子

文本高于按钮。它没有任何 CSS 属性。我正在使用 Bootstrap 前端框架,也许这就是问题所在?我该如何修复它?

谢谢提前!

编辑:

这是我的表格

<form action="/change" enctype="multipart/form-data" method="POST">

    <span class="help-block">Username</span>
    <input id="checkuser" type="text" name="nuser" value="<%= user.user %>"/>
    <i id="usricon" style="margin-left: 8px; margin-right: 5px;" class=""></i>
    <small id="usrc" style="padding-bottom: 3px;"></small>

    <span class="help-block">Email</span>
    <input id="checkmail" type="text" name="nmail" value="<%= user.mail %>"/><i
    id="milicon" style="margin-left: 8px; margin-right: 5px;"></i>
    <small id="milc" style="padding-bottom: 3px;"></small>

    <span class="help-block">Password</span>
    <input type="password" id="opass" name="opass" placeholder="Your old password"/>
    <i id="pssicon1" style="margin-left: 8px; margin-right: 5px;" class=""></i>
    <small id="pssc1" style="padding-bottom: 3px;"></small><br>
    <input type="password" id="ps" name="npass" placeholder="Your new password"/>
    <i id="pssicon2" style="margin-left: 8px; margin-right: 5px;" class=""></i>
    <small id="pssc2" style="padding-bottom: 3px;"></small>

    <span class="help-block">Avatar</span>
    <img class="img-rounded" style="height: 80px; width 80px" 
      src="<%= user.path %><%= user.avatar %>">
    <input id="avat" type="file" name="navatar" accept="image/*">

    <span style="margin-top: 1em" class="help-block">Background</span>
    <input type="file" id="back" name="nback" accept="image/*"><br>

    <input class="button" type="submit">

</form>
4

1 回答 1

0

通常,您无法设置输入文件标签的样式。这一切都是由浏览器完成的。有一些技术可以在其上叠加样式,但始终保留默认样式。

于 2013-02-02T21:12:44.393 回答