Method to define input type=file style_HTML/Xhtml_Web page production
WBOY
Release: 2016-05-16 16:41:18
Original
1620 people have browsed it
Why beautify the file control? Just imagine, the other children are all neatly dressed and beautiful, but two of them don't look down on you. It's so disharmonious.
The original file control is like this:
Don’t think that this is composed of a text and a button, it is a control , the html code is:
Copy the code
The code is as follows:
In this case We use a text and a button to display the style of this file. The html code is as follows:
Copy code
Code As follows:
div>
The outer layer of div is to provide a position reference for the input inside, because it needs to be relatively positioned when writing styles, so that the real file control covers the simulated one, and then hides the file control (even if the file control is not visible), so the css code is like this:
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