Sob*_*ine 8 html css jquery uploadify
首先,我通过这个SO问题上传了按钮:CSS样式?,但它是旧版本.
在Uploadify文档中,他们向我们展示了如何使用png图像更改按钮,我的问题是,是否可以在css中设置按钮的样式?如果是,那么如何在最新版本中完成?
到目前为止我做了什么,
HTML和CSS
<style type="text/css">
.uploadify-button {
background-color: transparent;
border: none;
padding: 0;
}
.uploadify:hover .uploadify-button {
background-color: transparent;
}
</style>
<input type="file" name="file_upload" id="file_upload" />
Run Code Online (Sandbox Code Playgroud)
JS
$(function() {
$("#file_upload").uploadify({
'buttonImage' : '/uploadify/browse-btn.png',
'swf' : '/uploadify/uploadify.swf',
'uploader' : '/uploadify/uploadify.php'
});
});
Run Code Online (Sandbox Code Playgroud)
它正是文档建议的,有没有办法用css设置Button的样式,而不是添加png图像作为按钮图像
hideButton您可以设置属性true并制作自己的按钮。
风格必须彻底重塑。
另外,设置wmode为'transparent'以避免出现问题。
现在,您可以将 CSS 应用到它所在的元素。
不要忘记设置属性width并height匹配按钮的尺寸。
其他解决方案是使用任何图像编辑器将 更改buttonImage为预先设置样式的 png 图像。