HTML输入框样式
来源:互联网 发布:淘宝联盟苹果下不了 编辑:程序博客网 时间:2024/06/04 22:33
昨天做项目,做一个后台登录页,老是感觉输入框不好看,然后就上网搜了一下,看到了这个,确实很好用,兄弟们想美化输入框的,来看看吧!
输入框景背景透明:
<input style="background:transparent;border:1px solid #ffffff">
鼠标划过输入框,输入框背景色变色:
<INPUTvalue="Type here" NAME="user_pass" TYPE="text" SIZE="29"onmouseover="this.style.borderColor='black';this.style.backgroundColor='plum'"
style="width: 106; height: 21"
onmouseout="this.style.borderColor='black';this.style.backgroundColor='#ffffff'" style="border-width:1px;border-color=black">
输入字时输入框边框闪烁(边框为小方型):
<Script Language="JavaScript">
function borderColor(){
if(self['oText'].style.borderColor=='red'){
self['oText'].style.borderColor = 'yellow';
}else{
self['oText'].style.borderColor = 'red';
}
oTime = setTimeout('borderColor()',400);
}
</Script>
<inputtype="text" id="oText" style="border:5px dotted red;color:red"onfocus="borderColor(this);" onblur="clearTimeout(oTime);">
输入字时输入框边框闪烁(边框为虚线):
<style>
#oText{border:1pxdotted #ff0000;ryo:expression(onfocus=function light(){with(document.all.oText){style.borderColor=(style.borderColor=="#ffee00"?"#ff0000":"#ffee00");timer=setTimeout(light,500);}},onblur=function(){this.style.borderColor="#ff0000";clearTimeout(timer)})};
</style>
<input type="text" id="oText">
自动横向廷伸的输入框:
<input type="text" style="huerreson:expression(this.width=this.scrollWidth)" value="abcdefghijk">
自动向下廷伸的文本框:
<textareaname="content" rows="6" cols="80"onpropertychange="if(this.scrollHeight> 80)this.style.posHeight=this.scrollHeight+5">输入几个回车试试</textarea& gt;
只有下划线的文本框:
<input style="border:0;border-bottom:1 solid black;background:;">
软件序列号式的输入框:
<script for="T" event="onkeyup">
if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();
</script>
<inputname="T" size="5" maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T7" size="5" maxlength="3">
软件序列号式的输入框(完整版):
<script for="T"event="onkeyup">if(value.length==maxLength)document.all[event.srcElement.sourceIndex+1].focus();</script>
<script for="T" event="onfocus">select();</script>
<script for="Submit" event="onclick">
var sn=new Array();
for(i=0;i<T.length;i++)
sn=T.value;
alert(sn.join("—"));
</script>
<inputname="T" size="5" maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5" maxlength="3">
<input type="submit" name="Submit">
原文地址:http://bbs.lampbrother.net/read-htm-tid-121706.html
输入框景背景透明:
<input style="background:transparent;border:1px solid #ffffff">
鼠标划过输入框,输入框背景色变色:
<INPUTvalue="Type here" NAME="user_pass" TYPE="text" SIZE="29"onmouseover="this.style.borderColor='black';this.style.backgroundColor='plum'"
style="width: 106; height: 21"
onmouseout="this.style.borderColor='black';this.style.backgroundColor='#ffffff'" style="border-width:1px;border-color=black">
输入字时输入框边框闪烁(边框为小方型):
<Script Language="JavaScript">
function borderColor(){
if(self['oText'].style.borderColor=='red'){
self['oText'].style.borderColor = 'yellow';
}else{
self['oText'].style.borderColor = 'red';
}
oTime = setTimeout('borderColor()',400);
}
</Script>
<inputtype="text" id="oText" style="border:5px dotted red;color:red"onfocus="borderColor(this);" onblur="clearTimeout(oTime);">
输入字时输入框边框闪烁(边框为虚线):
<style>
#oText{border:1pxdotted #ff0000;ryo:expression(onfocus=function light(){with(document.all.oText){style.borderColor=(style.borderColor=="#ffee00"?"#ff0000":"#ffee00");timer=setTimeout(light,500);}},onblur=function(){this.style.borderColor="#ff0000";clearTimeout(timer)})};
</style>
<input type="text" id="oText">
自动横向廷伸的输入框:
<input type="text" style="huerreson:expression(this.width=this.scrollWidth)" value="abcdefghijk">
自动向下廷伸的文本框:
<textareaname="content" rows="6" cols="80"onpropertychange="if(this.scrollHeight> 80)this.style.posHeight=this.scrollHeight+5">输入几个回车试试</textarea& gt;
只有下划线的文本框:
<input style="border:0;border-bottom:1 solid black;background:;">
软件序列号式的输入框:
<script for="T" event="onkeyup">
if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();
</script>
<inputname="T" size="5" maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T7" size="5" maxlength="3">
软件序列号式的输入框(完整版):
<script for="T"event="onkeyup">if(value.length==maxLength)document.all[event.srcElement.sourceIndex+1].focus();</script>
<script for="T" event="onfocus">select();</script>
<script for="Submit" event="onclick">
var sn=new Array();
for(i=0;i<T.length;i++)
sn=T.value;
alert(sn.join("—"));
</script>
<inputname="T" size="5" maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5"maxlength="3">—<input name="T" size="5" maxlength="3">
<input type="submit" name="Submit">
原文地址:http://bbs.lampbrother.net/read-htm-tid-121706.html
0
上一篇:一个人,如果你不逼自己一把,你根本不知道自己有多优秀
下一篇:我的兄弟连
相关热门文章
- 欢迎cjjkucla在ChinaUnix博客...
- 欢迎heihei1252在ChinaUnix博...
- 10065
- 欢迎tianyuan2014在ChinaUnix...
- 【春天多吃这些食物 让你青春...
- 毕业五年(续)
- 毕业五年
- 职业生涯规划
- 中国软件开发工程师之痛...
- 闲置书处理!
- 大家都是用什么来管理hadoop集...
- 网站被人挂了吗,添加了些程序...
- Nginx如何保证不走宕机的那个...
- 大家谈谈MYSQL客户端和服务器...
- 以下代码运行后为何会输出5?...
给主人留下些什么吧!~~
评论热议
- HTML输入框样式
- html表单输入框css样式美化特效源代码下载
- 输入框样式
- 输入框改变样式
- text输入框样式
- input输入框样式
- 简洁输入框样式
- 下划线样式的输入框
- 改变输入框默认样式
- 安卓输入框样式
- Android 输入框弹出样式
- input 输入框样式特效
- semantic ui输入框样式
- 给输入框添加样式
- html输入框效果
- HTML输入框优化
- HTML 样式
- html样式
- PHP常用正则表达式汇总
- eval的使用
- 第二个项目开始了.发一下我的VIM配置,各种插件,各种补全
- 一个人,如果你不逼自己一把,你根本不知道自己有多优秀
- 2步搞定ASP网站不能操作ACCESS数据库的问题
- HTML输入框样式
- Flash Player的版本
- 理解typedef
- 我的兄弟连
- 给自己一个新起点
- 在ViewFlipper中使用Rotate3dAnimation旋转切换界面效果
- 年轻的战场--(抢了一个大沙发,老衲笑而不语,哈哈。。)
- 老鸟请绕行---《写给我自己,纪念那些走过的弯路》
- 数组常用函数到图象处理整理.
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
环迅支付
安迅物流单号查询
光迅科技股吧
迅影套装
迅家园
迅哥网
迅飞输入法下载安装
迅数据恢复软件
002281光迅科技
贝纳利小迅龙
迅龙数据恢复软件
迅拼音
迅哥影网
迅影套装掉落
校迅通
云宫迅音简谱
迅加速器
迅龙加速器
迅达速递
迅的拼音
贝纳利小迅龙150s
小迅龙150s
云宫迅音玖月奇迹
迅龙硬盘数据恢复软件
迅达集团
迅付信息科技有限公司
全球黄金第一资迅
外国人评论云宫迅音
盗贼迅影套装详细出处
影美影迅
金逸今日影迅
横店影城今日影迅
迅捷路由器
迅捷转换器
迅捷
fast迅捷
迅捷pdf
迅捷网络
迅捷app
迅捷流星
迅捷物流