Adding style to file upload button in css

前端 未结 8 1983
不知归路
不知归路 2020-12-01 15:13

I have a text field and button with following css:

JS fiddle link : http://jsfiddle.net/Tdkre/

.submit {
      -moz-box-shadow:inset 0px 1px 0px 0px         


        
8条回答
  •  一个人的身影
    2020-12-01 15:37

    I tried this it looks pretty good to me. Are there any flaws with this? Here is the jsfiddle link http://jsfiddle.net/Tdkre/1/

    #FileUpload {
        position:relative;
    }
    
    #BrowserVisible {
        position: absolute;
        top: 0px;
        left: 0px;
        z-index: 1;
        background:url(upload.png) 100% 1px no-repeat;
        width:345px;
        height:30px;
    }
    
    #FileField {
        width:250px;
        margin-right:85px;
        padding: 6px;
        font-size: 13px;
        background: #fff url('bg-form-field.gif') top left repeat-x;
        border: 1px solid #d5d5d5;
        color: #333;
        border-radius: 4px 4px 4px 4px !important;
    }
    
    #BrowserHidden {
        position:relative;
        width:345px;
        height:30px;
        text-align: right;
        -moz-opacity:0;
        filter:alpha(opacity: 0);
        opacity: 0;
        z-index: 2; 
    }
    
    

    Here are the images enter image description here enter image description here

提交回复
热议问题