Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 引导:使用自定义映像进行文件上载_Html_Css_Twitter Bootstrap - Fatal编程技术网

Html 引导:使用自定义映像进行文件上载

Html 引导:使用自定义映像进行文件上载,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我必须使用给定的图像文件上传按钮使用bootstrap 3来定制我使用这个按钮的外观 <label class="btn btn-primary" for="my-file-selector"> <input id="my-file-selector" type="file" style="display:none;"> Button Text Here </label> 按钮文本在这里 但是有5个图像上传按钮,其中一个我必须使用提供的特

我必须使用给定的图像文件上传按钮使用bootstrap 3来定制我使用这个按钮的外观

<label class="btn btn-primary" for="my-file-selector">
    <input id="my-file-selector" type="file" style="display:none;">
    Button Text Here
</label>

按钮文本在这里

但是有5个图像上传按钮,其中一个我必须使用提供的特定图形,我如何使用它

如果您很接近,您需要通过css将
span
div
作为背景图像,如下所示

html

<label class="btn btn-primary" for="my-file-selector">
    <input id="my-file-selector" type="file" style="display:none;">
        <span id="image">Text</span>
</label>

如果您很接近,则需要通过css将
span
div
作为背景图像,如下所示

html

<label class="btn btn-primary" for="my-file-selector">
    <input id="my-file-selector" type="file" style="display:none;">
        <span id="image">Text</span>
</label>

您是否尝试将图像用作按钮?如果是这样,您可以添加
背景图像:url('image/url.png')作为CSS添加到按钮元素。是的,我正在尝试,所以bg图像可以吗?应该可以。如果您遇到任何问题,请尝试并报告。您是否尝试使用图像作为按钮?如果是这样,您可以添加
背景图像:url('image/url.png')作为CSS添加到按钮元素。是的,我正在尝试,所以bg图像可以吗?应该可以。如果遇到任何问题,请尝试并报告。