Home > Web Front-end > JS Tutorial > body text

Use transparent overlay method to beautify the file upload interface_form special effects

WBOY
Release: 2016-05-16 19:22:30
Original
980 people have browsed it

估计很多人都对文件域那难看的样式无可奈何,对于一个讲究完美的web系统来说,这种界面是无法接受的。gmail的附件添加在IE浏览器中实现了样式自定义,让大伙兴奋了好一这,他使用的是文件域的click()方法,但客户端的安全限制非常苛刻,必须结合iframe才能实现,代码比较繁锁。我使用的是透明叠加法,即把文件域置于点击目标之上,并让其透明,这样用户看到的是自定义热区,点击的依然是浏览按钮,没有违反任何安全机制。同样地,这种方法也支持firefox。


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template