文件上传input type="file"样式美化
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>定义input type="file" 的样式</title>
<style type="text/css">
body{ font-size:14px;}
input{ vertical-align:middle; margin:0; padding:0}
.file-box{ position:relative;width:340px}
.txt{ height:22px; border:1px solid #cdcdcd; width:180px;}
.btn{ background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;}
.file{ position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px }
</style>
</head>
<body>
<div class="file-box">
<form action="" method="post" enctype="multipart/form-data">
<input type='text' name='textfield' id='textfield' class='txt' />
<input type='button' class='btn' value='浏览...' />
<input type="file" name="fileField" class="file" id="fileField" size="28" onchange="document.getElementById('textfield').value=this.value" />
<input type="submit" name="submit" class="btn" value="上传" />
</form>
</div>
</body>
</html>
文件上传input type="file"样式美化的更多相关文章
- css input[type=file] 样式美化,input上传按钮美化
css input[type=file] 样式美化,input上传按钮美化 参考:http://www.haorooms.com/post/css_input_uploadmh
- input[type=file] 样式美化,input上传按钮美化
<style>.file { position: relative; display: inline-block; background: #D0EEFF; border: 1px sol ...
- Ajax 上传input type file 文件
Html: <div class="attach-img"> <label><input type="file" id=" ...
- input[type='file']样式美化及实现图片预览
前言 上传图片是常见的需求,多使用input标签.本文主要介绍 input标签的样式美化 和 实现图片预览. 用到的知识点有: 1.input标签的使用 2.filelist对象 和 file对象 3 ...
- html的文件控件<input type="file">样式的改变
一直以来,<input type="file">上传文件标签默认样式都是让人不爽的,使用它多要给它整整容什么的,当然如果用ui插件还比较方便,不能就自己来操刀实践一下! ...
- 文件上传按钮input[type="file"]按钮美化时在IE8中的bug【兼容至IE8】
首先看一下完成后的效果,鼠标移入可改变为手指的效果. 在此就不加图标了 <label class="file-upload"> <span>上传附件< ...
- input[type=file]样式更改以及图片上传预览
以前知道input[type=file]可以上传文件,但是没用过,今天初次用,总感觉默认样式怪怪的,想修改一下,于是折腾了半天,总算是小有收获. 以上是默认样式,这里我想小小的修改下: HTML代码如 ...
- html文件上传控件file自定义样式
问题: HTML自带的file上传按钮因在各种浏览器里显示样式不一.不易自定义样式给我们带来很大的麻烦. 解决思路: 将input[type=file]控件隐藏,使用一个input[type=text ...
- 改变文件上传input file类型的外观
当我们使用文件上传功能时,<input type="file">,但是外观有点不符合口味,如何解决这个问题? <input type="file&quo ...
随机推荐
- RadioButtonList选择事件onclick
<asp:RadioButtonList ID="rbtnFInvoiceType" runat="server" onclick="check ...
- javascript中的同源策略
如果两个页面拥有相同的协议(protocol),端口(如果指定),和主机,那么这两个页面就是属于同一个源 览器有一个很重要的概念——同源策略(Same-Origin Policy).所谓同源是指,域名 ...
- Android学习之菜单
android中包含多种菜单,本例带来的是选项菜单和上下文菜单. 1.选项菜单 在android中,开发者可以在xml文档中部署所要添加的菜单,在后台调用即可. <menu xmlns:andr ...
- iOS中有关配置 Apache 服务器的详细步骤
配置 Apache 服务器 目的: 能够有一个测试的服务器,Apache 服务器是免费的! 为什么是 Apache 使用最广的 Web 服务器 Mac自带,只需要修改几个配置就可以,简单,快捷 有些特 ...
- 读取hdfs文件内容
基础环境: cdh2.71 需要注意: url地址参照 <property> <name>dfs.namenode.servicerpc-address</name> ...
- eclipse 各种版本spring插件安装
一.安装之前先得知道怎么下载吧: 一般网上找到的资料是到这里就GG了的 --> http://spring.io/tools/sts/all 很明显这点版本是不够我们需要的,假如我们的eclip ...
- C++ Primer 读书笔记:第10章 关联容器
第10章 关联容器 引: map set multimap multiset 1.pair类型 pair<string, int> anon anon.first, anon.second ...
- linux下socket编程-UDP
下面是UDP的服务器的代码: /* server.c */ #include <stdio.h> #include <string.h> #include <netine ...
- 库函数strlen源码重现及注意问题
首先直接上源码: size_t strlen (const char * str) { const char *eos = str; while(*eos++); return(eos - str - ...
- 启动程序的c++方法
#include <Windows.h> void main() { WinExec( "notepad.exe fitdata.txt", SW_SHOW ); // ...