自定义文件上传按钮样式

来源:互联网 发布:淘宝打折后还显示原价 编辑:程序博客网 时间:2024/05/16 18:28

这里写图片描述

index.html
<div class="form-controls f-ct-por">    <input type="text" value="" class="f-text span3" name="textfield" id="textfield">    <input type="button" class="btn" value="浏览...">    <input type="file" name="fileField" class="file" id="fileField" size="28"></div>
style.css
.f-ct-por {    position: relative;}.btn, .btn:link, .btn:visited {    display: inline-block;    margin: 0 6px 0 0;    padding: 3px 8px;    overflow: visible;    color: #333;    vertical-align: middle;    text-align: center;    font: normal 12px/1.428571429 "\5FAE\8F6F\96C5\9ED1";    text-decoration: none;    white-space: nowrap;    background-color: #F5F5F5;    border: 1px solid #e6e6e6;    border-radius: 2px;    cursor: pointer;}.file {    position: absolute;    top: 4px;    left: 225px;    height: 24px;    width: 52px;    filter: alpha(opacity:0);    opacity: 0;}
0 0