自定義樣式1

<div class="u-upload">
    <button type="button">上傳文件</button>
    <input type="file"/>
</div>
<span class="u-upload">
    <button type="button">上傳文件</button>
    <input type="file"/>
</span>
<a href="#" class="u-upload">
    <button type="button">上傳文件</button>
    <input type="file"/>
</a>
<a href="#" class="u-upload">
    <button type="button">上傳</button>
    <input type="file"/>

</a> css


<style type="text/css"> spa

/* 定製文件上傳按鈕  */ .u-upload{display:inline-block;*display:inline;*zoom:1;position:relative;overflow:hidden;} .u-upload button{height:32px;padding:0 10px;border:1px solid #ccc;overflow:visible;font-size:14px;color:#666;background:#ddd;} .u-upload input{position:absolute;top:0;right:-1px;font-size:100px;cursor:pointer;opacity:0;filter:alpha(opacity=0);} .u-upload:hover button{border-color:#bbb;color:#333;background:#ccc;} a.u-upload,a.u-upload:hover{text-decoration:none;} </style>
相關文章
相關標籤/搜索