如何在输入类型=文件按钮上应用样式 [英] How to apply styles on input type=file button

查看:128
本文介绍了如何在输入类型=文件按钮上应用样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在输入类型=文件的上传按钮上应用样式,使其像引导按钮一样具有吸引力。有什么办法可以在这个按钮上应用样式。在bootstrap中有没有对它的支持?

I want to apply styles on input type=file's upload button to make it attractive as like bootstrap buttons. Is there any way to apply styles on this button. Is there any support for it in bootstrap ?

推荐答案

常见的解决方案是给你的输入[file]一个 opacity:0 postion:绝对(确保父元素有 position:relative

The common solution would be give your input[file] a opacity:0 and postion:absolute(make sure the parent element has position:relative), then let it appear on your normal bootstrap button.

请参阅演示我为您创建。

这篇关于如何在输入类型=文件按钮上应用样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆