表单常用样式汇总

input-placeholder获取焦点清空

<input type="text" placeholder="请输入" οnfοcus="this.placeholder=''" οnblur="this.placeholder='请输入'">

 

点击input 自动删除value文本内容

<input type="text" value="请输入" οnfοcus="if(this.value=='请输入'){this.value='';}" οnblur="if(this.value==''){this.value='请输入';}">

 

placeholder 颜色修改

<style>
        input::-webkit-input-placeholder{ color:#000; }
        input::-moz-placeholder{ color:#000;  /* Mozilla Firefox 19+ */  }
        input:-moz-placeholder{ color:#000;  /* Mozilla Firefox 4 to 18 */  }
        input:-ms-input-placeholder{ color:#000;  /* Internet Explorer 10-11 */  }
</style>

 

input点击出现的边框设置

input:focus{ outline:none }  /*去掉边框*/
input:focus{ outline:1px solid #000; }  /*外部边框颜色设置为黑色*/
input:focus{ border-color:#000; outline: none; }  /*内部边框颜色设置为黑色*/

 

文字两端对齐

.nr ul li span{ width:60px; height:35px; line-height:35px; float:left;text-align: justify}
.nr ul li span:after{ content:" "; display:inline-block; width:100%;}

 

 

 

 

 

 

待补充...

 

 

 

 

 

 

 

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
.x-form .x-btn{ height:25px; width:95px; line-height:25px; color:#000; background:#414143 url(images/btn_02.jpg); border:0px; margin-left:5px; } .x-form .x-brnull{ border-right:0px; } .x-msg{ background:#EEF5FF; margin:0px auto; color:#000; border:1px solid #ccc; } .x-msg A{ text-decoration:none; color:red; } .x-form .x-blnull{ border-left:0px; } .x-form-title,.x-form-title td{ font-weight:bold; color:#000; background:#eee; border:1px solid #dcdcdc; } .x-form-bBack td{ background:url(images/bg6.jpg) repeat-x; color:#FFF; border:1px solid #4D4D4D; } .x-form-bGreen td{ background:url(pic/bg14.jpg) repeat-x; } .x-form-title span,.x-form-title td span{ margin-left:10px; } /**列表***/ .x-list{ width:100%; font-size:12px; } /***列表Head**/ .x-list .x-head td,.x-list .x-head th{ /***background:url(images/head_bg.gif) repeat-x;**/ background:url(pic/bg14.jpg) repeat-x; height:27px; line-height:27px; text-align:center; font-weight:bold; } /**行的默认颜色**/ .x-list td{ padding-left:3px; height:27px; line-height:27px; border:1px solid #dcdcdc; } .x-list .x-sRow td{ background:#F8F8F8; } /**偶数行背景颜色***/ .x-list .x-dRow td{ background: #FBECC6; } /**选中TD背景颜色**/ .x-list .x-stRow td{ background:#d5effc url(images/td_over.png) repeat-x; } /**内容显示位置 left center right**/ .x-list .x-l{ text-align:left; } .x-list .x-c{ text-align:center; } .x-list .x-l{ text-align:right; } /**分页**/ .x-list .x-page{ height:35px; line-height:35px; background:#eee; text-align:center; } .x-list .x-page A{ margin-left:5px; text-decoration:none; color:#004A9B; } .x-list .x-page A:hover{ color:#404040; } .x-list td .x-a A{ text-decoration:none; color:#000; } .x-list td .x-a A:hover{ text-decoration:underline; color:#999; } 比较实用的box样式表单
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值