Home  >  Article  >  Web Front-end  >  The upload button after the image is overwritten does not work_html/css_WEB-ITnose

The upload button after the image is overwritten does not work_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:20:521790browse

Button The next one covers the upload button. How can I click on the picture after using absolute positioning? Why doesn't it work? ? The event I want is to click on the image to trigger the event


Reply to the discussion (solution)

Why bother? Just set the input transparency to 0 and cover it with the image.

Why bother? Just set the input transparency to 0 and cover it on top of the image.

What idea...I don’t understand it.
This is what I do. First, after clicking a button, two buttons are generated. One of them is the upload button...it is covered with a picture...and that input type =file There is no designated button for this. It’s just a picture. I’m speechless. I just have to overwrite it with this picture and then click FILE to upload it. It’s a bit confusing.

Another problem is that it must be used for our business needs. This picture...so...

Yes, that's right. You have the image covering the button. You can't click the button when you see the image. Currently, browsers do not support simulating file click operations.

So, you go back and cover the button on the image, but set the transparency of the button to 0, so that the user can see where the image is and click on the image. What they actually click on is the transparency of the image. 0 button.

Got it?

Is it so complicated? Can’t the picture be used as the background image of the button?

Is it so complicated? Can’t the picture be used as the background image of the button?

You can try adding a background to the file.

Statement:
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