file标签样式修改
2024-08-25 11:16:13
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>
最新文章
- 工作随笔——一次简单的Maven加速构建实战
- php 用户登录验证
- 在SQL里如何写条件逻辑?
- Hermes实时检索分析平台
- hdu 4185 二分图匹配
- 行为识别笔记:improved dense trajectories算法(iDT算法)(转载)
- 关于Qt
- 重要常用的Lunix命令
- 1040. Longest Symmetric String (25)
- spoj 375 QTREE - Query on a tree 树链剖分
- C语言链表的建立、插入和删除
- 2apt-get命令,deb包安装,源码安装
- springboot数据库连接池使用策略
- python selenium TouchAction模拟移动端触摸操作(十八)
- 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:
- 海洋cms v6.53 v6.54版本漏洞复现
- HDU 1054 Strategic Game (最小点覆盖)【二分图匹配】
- C#中的快捷键,可以更方便的编写代码
- elixir中的truth和true
- [javaSE] GUI(练习-列出指定目录内容)
热门文章
- Topcoder SRM 145 DIV 1
- 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 ->; SQL easonjim
- Dicom Conformance
- 慕课网python进阶函数式编程学习记录
- IntelliJ IDEA创建文件时自动填入作者时间 定制格式
- AngularJS中选择样式
- 又一次遇到Data truncation: Data too longData truncation: Data too long问题
- 重读金典------高质量C编程指南(林锐)-------第六章 函数设计
- Javascript模式(一) 单例模式
- 高阶函数:filter()