1、

这是默认的file样式,无法修改,在网页中用它感觉非常不合群,大部分修改的办法就是把它隐藏,绝对定位一个文本框和一个按钮

这是修改后的样式,之后修改样式就是分别修改文本框和按钮样式了,就非常简单了

<!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=utf-8" />
<title>无标题文档</title>
</head> <body>
<div style="float: left">
<input id="fileUrl" name="type" type="text" class="td_input" />
</div>
<div style="float: left; margin-left:10px;">
<div id="btnChose"><input type="button" value="浏览..." style=" border:#666 solid 1px;background:#fff"/></div>
</div>
<div style="position:absolute;filter:alpha(opacity=1); -moz-opacity:.0; opacity:0.0;">
<input type="file" id="file" onmouseover="this.style.cursor='pointer'" onchange="document.getElementById('fileUrl').value=this.value" style="" />
</div>
</body>
</html>

最新文章

  1. 工作随笔——一次简单的Maven加速构建实战
  2. php 用户登录验证
  3. 在SQL里如何写条件逻辑?
  4. Hermes实时检索分析平台
  5. hdu 4185 二分图匹配
  6. 行为识别笔记:improved dense trajectories算法(iDT算法)(转载)
  7. 关于Qt
  8. 重要常用的Lunix命令
  9. 1040. Longest Symmetric String (25)
  10. spoj 375 QTREE - Query on a tree 树链剖分
  11. C语言链表的建立、插入和删除
  12. 2apt-get命令,deb包安装,源码安装
  13. springboot数据库连接池使用策略
  14. python selenium TouchAction模拟移动端触摸操作(十八)
  15. Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment:
  16. 海洋cms v6.53 v6.54版本漏洞复现
  17. HDU 1054 Strategic Game (最小点覆盖)【二分图匹配】
  18. C#中的快捷键,可以更方便的编写代码
  19. elixir中的truth和true
  20. [javaSE] GUI(练习-列出指定目录内容)

热门文章

  1. Topcoder SRM 145 DIV 1
  2. MySQL错误:Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -&gt; SQL easonjim
  3. Dicom Conformance
  4. 慕课网python进阶函数式编程学习记录
  5. IntelliJ IDEA创建文件时自动填入作者时间 定制格式
  6. AngularJS中选择样式
  7. 又一次遇到Data truncation: Data too longData truncation: Data too long问题
  8. 重读金典------高质量C编程指南(林锐)-------第六章 函数设计
  9. Javascript模式(一) 单例模式
  10. 高阶函数:filter()