Uploadify button: Style with CSS?

后端 未结 8 2220
挽巷
挽巷 2020-12-04 12:44

Is it possible to replace the Uploadify button (which is a graphic containing up/over/down states) with a simple CSS-styled button?

8条回答
  •  忘掉有多难
    2020-12-04 13:09

    reading your answers helped me to solve this one this way

    1. First wrap the into a
    2. Apply styles to this new wrapper (even :hover)
    3. Use the hiddeButton option

    HTML:

    CSS:

    .upload-wrap{
        background:#ff0;
        width:133px;
        height:36px;
    }
    .upload-wrap:hover{
        background:#f00;
    }
    

    JS

    $('#file_upload').uploadify({
        'uploader'      : 'uploadify/uploadify.swf',
        'script'        : 'uploadify/uploadify.php',
        'folder'        : 'files/images',
        'hideButton'    : true,
        'wmode'     : 'transparent',
        'buttonText'    : 'Upload something'
        'width'         : 133,
        'height'        : 36    
      });
    

    This way you're able to style your button, an keep the buttonText option available. I also had to mess a little bit with the .fla file to get the color and font for my button

提交回复
热议问题