gpt4 book ai didi

material-design - 如何将 MDL 按钮样式应用于文件选择器?

转载 作者:行者123 更新时间:2023-12-04 07:22:29 25 4
gpt4 key购买 nike

我想知道是否有办法将 Material Design Lite 按钮样式应用于文件选择器,即通过以下方式在 HTML 页面上创建的组件:

<input type="file" id="filePicker" />

我希望组件的“浏览”按钮具有凸起按钮的外观(如果可能,带有波纹)。见 http://www.getmdl.io/components/#buttons-section .

谢谢!

最佳答案

使用 CSS,你的意思是这样的吗?

<style>#file { display: none }</style>

<input type="file" id="file">
<label for="file" class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
<i class="material-icons">+</i>
</label>

https://jsfiddle.net/sj838cLg/

关于material-design - 如何将 MDL 按钮样式应用于文件选择器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34211390/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com