__

一般的选择框在美化过程中会出现各种问题,样式出错,文字无法更改等...

所有随之而生的便是这样的一种修饰方式:[将type=file的input与另一个按钮通过js绑定,这样便可以通过改变另一个按钮的样式来达到美化的效果了。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
.dif{
height:40px;background:#f5f8fa;border:none;border-radius:30px;
}
</style>
</head>
<body>
<input type="file"style="display:none" >
<button class="dif" onclick="F_Open_dialog()">上传文件</button>
</body>
<script type="text/javascript">
function F_Open_dialog() {
document.getElementById("btn_file").click();
}
</script>
</html>

input[type=file]的美化的更多相关文章

  1. css input[type=file] 样式美化,input上传按钮美化

    css input[type=file] 样式美化,input上传按钮美化 参考:http://www.haorooms.com/post/css_input_uploadmh

  2. input[type='file']样式美化及实现图片预览

    前言 上传图片是常见的需求,多使用input标签.本文主要介绍 input标签的样式美化 和 实现图片预览. 用到的知识点有: 1.input标签的使用 2.filelist对象 和 file对象 3 ...

  3. 文件上传input type="file"样式美化

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  4. 文件上传按钮input[type="file"]按钮美化时在IE8中的bug【兼容至IE8】

    首先看一下完成后的效果,鼠标移入可改变为手指的效果. 在此就不加图标了 <label class="file-upload"> <span>上传附件< ...

  5. input[type=file] 样式美化,input上传按钮美化

    <style>.file { position: relative; display: inline-block; background: #D0EEFF; border: 1px sol ...

  6. input type=file美化

    最近碰到input type=file 之前用模拟点击来实现美化,发现在IE7下会有bug导致图片上传不上去,最后改用直接美化的方法 <!DOCTYPE html> <html la ...

  7. input type=file 上传文件样式美化(转载)

    input type=file 上传文件样式美化 来源:https://www.jianshu.com/p/6390595e5a36 在做input文本上传时,由于html原生的上传按钮比较丑,需要对 ...

  8. html input[type=file] css样式美化【转藏】

    相信做前端的都知道了,input[type=file]和其他输入标签不一样,它的事件必须是在触发自身元素上,而不能是其他元素.所以不能简单的把input隐藏,放个button上去. <a hre ...

  9. 【原创】js中input type=file的一些问题

    1.介绍 在开发中,文件上传必不可少,input[type=file] 是常用的上传标签,但是它长得又丑.浏览的字样不能换,但是他长得到底有多丑呢.我们来看看在不同浏览器里的样子吧. <inpu ...

随机推荐

  1. 【Maven Jenkins】No resource to compile 还有多少坑要踩。。。LongTimeNoSee

    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ toptown-webservice-vcrs ---[INFO] N ...

  2. c#之AES加密解密

    .Net已封装好算法,直接调用即可,代码如下: 转载请注明出处:https://www.cnblogs.com/jietian331/p/9707771.html using System; usin ...

  3. Objective-C RunTime 学习笔记 之 atomic/nonatomic 关键字

    atomic修饰的是变量/方法,对于可变对象的指针变量是安全的,内部实现加了锁,但是对可变对象本身没什么影响,不安全还是不安全.另外atomic仅仅对编译器生产的getter.setter有效,如果自 ...

  4. Django框架详细介绍---AJAX

    一.概述 1.什么是JSON JSON 指的是 JavaScript 对象表示法(JavaScript Object Notation) JSON 是轻量级的文本数据交换格式 JSON 独立于语言 * ...

  5. pygame 游戏舞台搭建典型应用

    #两个文件要放在同一目录中,包括图片 一.搭建游戏舞台主程序 #!/usr/bin/env python3#_*_coding:utf-8_*_ author ==$ VACyp import sys ...

  6. Shrinking images on Linux

    When creating images from existing ISOs you often need to allocate a number of MB for the image to a ...

  7. IT题库7-线程加锁

    转载:http://www.cnblogs.com/linjiqin/p/3208843.html 一.同步问题提出 线程的同步是为了防止多个线程访问一个数据对象时,对数据造成的破坏.例如:两个线程T ...

  8. 执行python解释器的两种方式

    执行python解释器的两种方式 1.交互式 python是高级语言,是解释型语言,逐行翻译,写一句翻译一句 print ('hello world') 2.命令行式 python和python解释器 ...

  9. Hadoop 进程配置总结

    HDFS: NameNode: core-site.xml <property> <name>fs.defaultFS</name> <value>hd ...

  10. vue获得当前页面URL动态拼接URL复制邀请链接方法

    vue获得当前页面URL动态拼接URL复制邀请链接方法 当前页面完整url可以用 location.href路由路径可以用 this.$route.path路由路径参数 this.$route.par ...