HTML Input[type=file] CSS style beautify "go to hide"

Source: Internet
Author: User

I believe the front end knows, Input[type=file] Unlike other input tags, its events must be triggered on its own elements, not other elements. So you can't simply hide input and put a button up.

 <  a  href  = "javascript:;"   class  = "A-upload"     >  <  input  type  = "File"   name  = ""   ID  = ""  >   </ a  >  
/*a  upload */.a-upload {    padding:4px 10px;    height:20px;    line-height:20px;    position:relative;    Cursor:pointer;    Color: #888;    Background: #fafafa;    border:1px solid #ddd;    border-radius:4px;    Overflow:hidden;    Display:inline-block;    *display:inline;    *zoom:1}. A-upload  input {    position:absolute;    font-size:100px;    right:0;    top:0;    opacity:0;    Filter:alpha (opacity=0);    Cursor:pointer}. A-upload:hover {    color: #444;    Background: #eee;    Border-color: #ccc;    Text-decoration:none}
View Code

Original source: http://qianduanblog.com/post/css-learning-3-html-input-type-file-css-beautify.html

HTML Input[type=file] CSS style beautify "go to hide"

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.