javascript - The input file is transparent and covered with other buttons. How to solve the problem when the cursor flashes when clicked in IE?
迷茫
迷茫 2017-06-17 09:15:25
0
1
793

<form action="" id="formPathfile" name="formPathfile" method="post" enctype="multipart/form-data" onsubmit="return false">

    <input type="hidden" id="itemid" name="itemid" value=""/>
    <input type="button" id="pfle" style="width:100px;  position: absolute;
    left: 0;top:0" value="Browse Flie" onchange="return false">    
    <input type="file" id="pfile" value="" name="pfile" style="margin-top:-8px; filter:alpha(opacity=0);
opacity:0;" onchange=""  />
    
</form>

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
Ty80

Cause

Why does the cursor flash in IE? I reproduced your code: as shown

Solution ideas

The solution I will talk about here is mainly to use relative and absolute or CSS layers to solve it. Set the button to be displayed to position: relative; then set the upload button to position: absolute; and the upload button puts the layer at Display the upper layer of the button eg: z-index:999

Related information

I have also encountered the beautification of upload buttons before: portal input upload button beautification

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template