Input background image settings

Source: Internet
Author: User

HTML code:

<Input type = "file" id = "file_btn" src = "img.jpg"/>

CSS code:

Input [type = "file"] {/* General settings: introduce an image background and set it to the center. The size is the same as the button size, and the mouse pointer is hand */width: 40px; Height: 40px; Background: url(img.jpg) No-repeat center; cursor: pointer;
/* You don't need to ask the following questions. You can copy the four sentences together. The approximate meaning is to set the value to 0 pixels, that is, the value cannot be seen by the naked eye, but it does exist again (it can be proved by $ _ post ['submit _ BTN ']) */display: block; font-size: 0; line-Height: 0; text-indent:-9999px;

Input background image settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.