<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<!-- 为移动设备添加 viewport -->
<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<!-- 添加到主屏后的标题(iOS 6 新增) -->
<meta name="apple-mobile-web-app-title" content="">
<meta name="format-detection" content="telephone=no">
<!-- 是否启用 WebApp 全屏模式,删除苹果默认的工具栏和菜单栏 -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>图片预加载</title>
<title></title>
<style>
/*end*/
</style>
</head>
<html>
<body>
<style>
.file {
position: relative;
display: inline-block;
background: #D0EEFF;
border: 1px solid #99D3F5;
border-radius: 4px;
width:100px;
height: 36px;
display: inline-block;
line-height: 36px;
text-decoration: none;
}
.file input {
position: absolute;
right: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
display: inline-block;
line-height: 36px;
opacity: 0;
}
</style>
<div class="file">
<input type="file">
</div>
<body>
<script>
</script>
</html>
input checked file 样式改写
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 今天公司要我写移动端点击按钮本地上传照片,本人不会写,所以就只写了一个样式,结果发现默认的样式不好看。就查资料改写...
- input file上传按钮的美化思路是,先把之前的按钮透明度opacity设置为0,然后,外层用div包裹,就实...
- 工作中需要自定义一个上传按钮,看了张鑫旭的文章,才想到当初可以用lable给input type=file设计样式...
- 首先我们先要了解一下各浏览器的浏览按钮的共同特性: 1、都可以设置整体的宽度和高度,但在IE、火狐、Opera中设...