HTML 文件输入不考虑溢出已隐藏
HTML file input not respecting overflow hidden
我在 div
中有一个 file input
元素,其中 border-radius
和 overflow
设置为 hidden
,但出于某种原因我能够通过单击 border-radius
切断的区域来激活文件输入。
JS Fiddle: http://jsfiddle.net/7consvgu/1/
I have updated your code is JSFiddle - [https://jsfiddle.net/7consvgu/4/][1]
* Changes: Input width added: 100%;
* Border-radius: same as circle
* Box-sizing: border-box for all elements for normalize
* Padding: to align text horizontal & vertical center
我在 div
中有一个 file input
元素,其中 border-radius
和 overflow
设置为 hidden
,但出于某种原因我能够通过单击 border-radius
切断的区域来激活文件输入。
JS Fiddle: http://jsfiddle.net/7consvgu/1/
I have updated your code is JSFiddle - [https://jsfiddle.net/7consvgu/4/][1]
* Changes: Input width added: 100%;
* Border-radius: same as circle
* Box-sizing: border-box for all elements for normalize
* Padding: to align text horizontal & vertical center