成人精品一区二区三区中文字幕-成人精品一区二区三区-成人精品一级毛片-成人精品亚洲-日本在线视频一区二区-日本在线视频免费

導(dǎo)航首頁 ? 技術(shù)教程 ? jquery實現(xiàn)簡潔文件上傳表單樣式
全站頭部文字 我要出現(xiàn)在這里
jquery實現(xiàn)簡潔文件上傳表單樣式 614 2024-03-22   

文章開始先告訴大家制作jquery實現(xiàn)簡潔文件上傳表單樣式的簡易教程。

效果圖:

查看圖片

頁面結(jié)構(gòu):

<div class="uploader white">
<input type="text" class="filename" readonly="readonly"/>
<input type="button" name="file" class="button" value="Browse..."/>
<input type="file" size="30"/>
</div>

css文件樣式:

.uploader{
position:relative;
display:inline-block;
overflow:hidden;
cursor:default;
padding:0;
margin:10px 0px;
-moz-box-shadow:0px 0px 5px #ddd;
-webkit-box-shadow:0px 0px 5px #ddd;
box-shadow:0px 0px 5px #ddd;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
}
.filename{
float:left;
display:inline-block;
outline:0 none;
height:32px;
width:180px;
margin:0;
padding:8px 10px;
overflow:hidden;
cursor:default;
border:1px solid;
border-right:0;
font:9pt/100% Arial, Helvetica, sans-serif; color:#777;
text-shadow:1px 1px 0px #fff;
text-overflow:ellipsis;
white-space:nowrap;
-moz-border-radius:5px 0px 0px 5px;
-webkit-border-radius:5px 0px 0px 5px;
border-radius:5px 0px 0px 5px;
background:#f5f5f5;
background:-moz-linear-gradient(top, #fafafa 0%, #eee 100%);
background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#fafafa), color-stop(100%,#f5f5f5));
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#f5f5f5',GradientType=0);
border-color:#ccc;
-moz-box-shadow:0px 0px 1px #fff inset;
-webkit-box-shadow:0px 0px 1px #fff inset;
box-shadow:0px 0px 1px #fff inset;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
.button{
float:left;
height:32px;
display:inline-block;
outline:0 none;
padding:8px 12px;
margin:0;
cursor:pointer;
border:1px solid;
font:bold 9pt/100% Arial, Helvetica, sans-serif;
-moz-border-radius:0px 5px 5px 0px;
-webkit-border-radius:0px 5px 5px 0px;
border-radius:0px 5px 5px 0px;
-moz-box-shadow:0px 0px 1px #fff inset;
-webkit-box-shadow:0px 0px 1px #fff inset;
box-shadow:0px 0px 1px #fff inset;
}
.uploader input[type=file]{
position:absolute;
top:0; right:0; bottom:0;
border:0;
padding:0; margin:0;
height:30px;
cursor:pointer;
filter:alpha(opacity=0);
-moz-opacity:0;
-khtml-opacity: 0;
opacity:0;
}
input[type=button]::-moz-focus-inner{padding:0; border:0 none; -moz-box-sizing:content-box;}
input[type=button]::-webkit-focus-inner{padding:0; border:0 none; -webkit-box-sizing:content-box;}
input[type=text]::-moz-focus-inner{padding:0; border:0 none; -moz-box-sizing:content-box;}
input[type=text]::-webkit-focus-inner{padding:0; border:0 none; -webkit-box-sizing:content-box;}

javascript部分代碼:

<script>$(function(){
 $("input[type=file]").change(function(){$(this).parents(".uploader").find(".filename").val($(this).val());});
 $("input[type=file]").each(function(){
 if($(this).val()==""){$(this).parents(".uploader").find(".filename").val("No file selected...");}
 });
});
</script>

下載地址: jquery實現(xiàn)簡潔文件上傳表單樣式

希望這款簡潔實用的jquery實現(xiàn)文件上傳表單樣式大家會喜歡,并可以應(yīng)用到自己的項目中。



主站蜘蛛池模板: 皮肤诊所| 未来警察| 工程力学电子版教材| 欧美日韩欧美日韩| 伤残等级1-10标准图| 挤鼻子黑头超多视频| 六扇门电影大全| 砌生猪肉| 沙漠里的鱼| 免费头像图片| 梦断楼兰电影| 漂亮主妇电视剧| 日本变态裸体挠痒痒视频| 低糖食物一览表| 派拉蒙影业| 美女亲热视频| 老爸老妈浪漫史第一季| 刀郎歌曲简谱| 中央6套| 我的m属性学姐| sarah brightman| 草船借箭剧本| 马修·麦克费登| 新闻联播台词| 吴朋奉| 《遇见你之后》电影在线观看| 凤凰卫视节目表| 情人意大利| 2025最好运头像| 李亚红| 永远的乳房 电影| 料音| 松果儿| 叶子楣地下裁决| 日日夜精品视频| 假男假女 电影| 郭碧婷是哪里人| 天与地越南战争在线观看免费| 贴身情人之贴身恋李华月| 长元音| 文熙俊|

?。。≌鹃L長期在線接?。?!

網(wǎng)站、小程序:定制開發(fā)/二次開發(fā)/仿制開發(fā)等

各種疑難雜癥解決/定制接口/定制采集等

站長微信:lxwl520520

站長QQ:1737366103