前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >FF下修改美化文件域(input type=file)的样式

FF下修改美化文件域(input type=file)的样式

作者头像
练小习
发布2017-12-29 14:10:09
1.1K0
发布2017-12-29 14:10:09
举报
文章被收录于专栏:练小习的专栏练小习的专栏

有兄弟问我修改美化文件域(input type=file)在FF下的样式,暂时没看兼容.也没美化.等到了上海安定好了再好好修改下

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<meta name="keywords" content="程让,练习">

<meta name="description" content="程让个人站">

<style>

input{border:1px solid #ff9900;}

div {width:300px;position:relative;}

p {float:left}

.file {position:absolute;top:20px;right:300px;+top:0;+right:73px;width:0px;height:30px;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;}

#txt {height:20px;margin:1px}

#ii {width:70px;height:24px;margin-top:1px;+margin-top:2px;_margin-top:2px;}

</style>

</head>

<body>

<div>

<form method="post" action="" enctype="multipart/form-data">

<p>

<input type="text" id="txt" name="txt" />

</p>

<p>

<input id="ii" type="button" value="请选择文件" />

</p>

<p>

<input type="file" onchange="txt.value=this.value" class="file" />

</p>

</form>

</div>

</body>

</html>

提示:你可以先修改部分代码再运行。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档