【问题标题】:class for wrapping up upload button with select file input使用选择文件输入包装上传按钮的类
【发布时间】:2020-08-04 22:55:20
【问题描述】:

我最近在我的页面上下载了一个用于登录/注册的模板,并试图找出一个可以封装上传按钮(字体真棒图标)和图像的选择文件输入控件的类。 这是我的代码...

<html>
<head>
<--//Bootstrap support plugins->
</head>
<body>
<div class="wthree-form bg">
<div class="agileits-2">
<h2>Sign Up Here</h2>
</div>
<form action="signup.php" enctype="multipart/form-data" method="post">
<--These classes make the form look real good by wrapping up the font awesome icon with an input field->
<div class="w3-user">
<span><i class="fa fa-user-o"></i></span>
<input type="text" name="Username" placeholder="Username" required="">
</div>
<--Here is my problem->
<div class="w3-? ">
<span><i class="fa fa-upload"></i></span>
<input type="file" name="fileToUpload">
</div>
<form>
</div>
</body>
</html>

上面的问号是什么需要一个类来使表单将上传图标与优雅的选择文件控件一起包装以使其看起来不错谢谢... 其他换行控件运行良好

【问题讨论】:

    标签: html class


    【解决方案1】:

    我不确定这是否能解决您的问题,但您似乎需要将第二个表单标记更改为结束表单标记。

    改变

    <div class="w3-? ">
    <span><i class="fa fa-upload"></i></span>
    <input type="file" name="fileToUpload">
    </div>
    <form>
    </div>
    </body>
    </html>
    

    到

    <div class="w3-? ">
    <span><i class="fa fa-upload"></i></span>
    <input type="file" name="fileToUpload">
    </div>
    </form>
    </div>
    </body>
    </html>
    

    【讨论】:

    • 我需要像“w3-user”这样的类,像“w3-file”这样的类,无论如何感谢您的回答
    猜你喜欢
    • 2020-06-25
    • 1970-01-01
    • 1970-01-01
    • 2018-12-28
    • 1970-01-01
    • 2014-12-08
    • 2016-11-30
    • 2017-05-09
    • 2023-02-04
    相关资源
    最近更新 更多