css input[type=file] 樣式美化(input上傳文件樣式 )
發(fā)布時(shí)間:2018-06-20 16:54:58 作者:佚名
我要評(píng)論

這篇文章主要介紹了css input[type=file] 樣式美化(input上傳文件樣式 )的相關(guān)資料,需要的朋友可以參考下
效果:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>無(wú)標(biāo)題文檔</title> <style> /*樣式1*/ .a-upload { padding: 4px 10px; height: 20px; line-height: 20px; position: relative; cursor: pointer; color: #888; background: #fafafa; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; display: inline-block; *display: inline; *zoom: 1 } .a-upload input { position: absolute; font-size: 100px; right: 0; top: 0; opacity: 0; filter: alpha(opacity=0); cursor: pointer } .a-upload:hover { color: #444; background: #eee; border-color: #ccc; text-decoration: none } /*樣式2*/ .file { position: relative; display: inline-block; background: #D0EEFF; border: 1px solid #99D3F5; border-radius: 4px; padding: 4px 12px; overflow: hidden; color: #1E88C7; text-decoration: none; text-indent: 0; line-height: 20px; } .file input { position: absolute; font-size: 100px; right: 0; top: 0; opacity: 0; } .file:hover { background: #AADFFD; border-color: #78C3F3; color: #004974; text-decoration: none; } </style> </head> <body style="padding: 10px"> <a href="javascript:;" class="a-upload"> <input type="file" name="" id="">點(diǎn)擊這里上傳文件 </a> <a href="javascript:;" class="file">選擇文件 <input type="file" name="" id=""> </a> </body> </html>
總結(jié)
以上所述是小編給大家介紹的css input[type=file] 樣式美化(input上傳文件樣式 ),希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
基于jQuery+CSS3實(shí)現(xiàn)帶動(dòng)畫(huà)效果文件上傳插件特效源碼
基于jQuery+CSS3實(shí)現(xiàn)帶動(dòng)畫(huà)效果文件上傳插件特效源碼是一款基于jQuery+CSS3實(shí)現(xiàn)的上傳界面,支持文件拖到上傳動(dòng)畫(huà)代碼。本段特效源碼可以在各大網(wǎng)站使用,有需要的朋友直接2017-07-10HTML5+CSS3實(shí)現(xiàn)無(wú)插件拖拽上傳圖片(支持預(yù)覽與批量)
本篇文章主要介紹了HTML5+CSS3實(shí)現(xiàn)無(wú)插件拖拽上傳圖片(支持預(yù)覽與批量),現(xiàn)在html5提供了API以及File,F(xiàn)ileReader,XMLHttpRequest等強(qiáng)大的API,為我們拖放實(shí)現(xiàn)上傳提供2017-01-05文件上傳input file簡(jiǎn)便美化方案(css)
文件上傳input在各個(gè)瀏覽器里表現(xiàn)形式都不一樣,這里通過(guò)css樣式控制,盡量在多瀏覽器中的表現(xiàn)都一樣2013-01-10利用label標(biāo)簽和CSS美化文件上傳表單(不兼容IE6)
文件上傳類(lèi)型表單是一個(gè)讓很多前端開(kāi)發(fā)者糾結(jié)過(guò)的表單類(lèi)型,因?yàn)樗且粋€(gè)無(wú)法單純用CSS給它定義兼容的樣式。2011-06-20- 表單上傳文件的“瀏覽”按鈕修改代碼,需要的朋友可以參考下。2011-05-03
- 這篇文章主要介紹了使用css畫(huà)一個(gè)文件上傳圖案效果,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友參考下吧2019-12-16