1.
input改变placeholder的颜色 主要是ie
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder{
color: #ff0000;
font-size:14px;
}
input:-ms-input-placeholder, textarea:-ms-input-placeholder{
color: #ff0000;
font-size:14px;
}
2.
当给body背景图时,html要给100% height:100% body才可以给背景定位center center,否则在ie 8 9会只显示一般
3.
自定义滚动条插件,实时更新滚动条函数
scrollBar2.scrollBar.update(0,20);
4.
添加选项卡的时候 加class 应该找父级 然后在找子集 找到的才是唯一的
var a3= $(this).parent();
var a4 = a3.parent();
var a5 = a4.parent();
a4.find('.fd-qsf-con-jtnr-top-con-ren2').removeClass('fd-qsf-con-jtnr-top-con-ren2-xz');
a4.find('.fd-qsf-con-jtnr-top-con-ren2').addClass('fd-qsf-con-jtnr-top-con-ren2-mr');
a4.find('.fd-qsf-con-jtnr-top-con-ren3').removeClass('fd-qsf-con-jtnr-top-con-ren3-xz')
a4.find('.fd-qsf-con-jtnr-top-con-ren3').addClass('fd-qsf-con-jtnr-top-con-ren3-mr');
$(this).removeClass('fd-qsf-con-jtnr-top-con-ren1-mr')
$(this).addClass('fd-qsf-con-jtnr-top-con-ren1-xz')
a5.find('.fd-qsf-con-jtnr-bot-01').addClass('fd-hide').eq(0).removeClass('fd-hide');
5.
http://blog.csdn.net/hanshileiai/article/details/40398177
纯css修改浏览器默认滚动条
::-webkit-scrollbar/*整体部分*/
{
10px;
height:10px;
}
::-webkit-scrollbar-track/*滑动轨道*/
{
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
border-radius: 0px;
background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb/*滑块*/
{
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background: rgba(0,0,0,0.2);
}
::-webkit-scrollbar-thumb:hover/*滑块效果*/
{
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background: rgba(0,0,0,0.4);
}
IE下面的CSS设置滚动条
IE下面就比较简单那了,自定义的项目比较少,全是颜色。
- scrollbar-arrow-color: color; /*三角箭头的颜色*/
- scrollbar-face-color: color; /*立体滚动条的颜色(包括箭头部分的背景色)*/
- scrollbar-3dlight-color: color; /*立体滚动条亮边的颜色*/
- scrollbar-highlight-color: color; /*滚动条的高亮颜色(左阴影?)*/
- scrollbar-shadow-color: color; /*立体滚动条阴影的颜色*/
- scrollbar-darkshadow-color: color; /*立体滚动条外阴影的颜色*/
- scrollbar-track-color: color; /*立体滚动条背景颜色*/
- scrollbar-base-color:color; /*滚动条的基色*/
6.
选项卡 改变不同背景图的时候 可以给单独的class后边加单独的active,这样找到的就是当前选中元素的背景图 不会影响其他
.fd-dqzt-0{
background-image:url(../images/module-common/danger01.png);
}
.fd-dqzt-1{
background-image:url(../images/module-common/lamp_r.png);
}
.fd-dqzt-2{
background-image:url(../images/module-common/lamp_o.png);
}
.fd-dqzt-3{
background-image:url(../images/module-common/lamp_g.png);
}/**/
.fd-dqzt-0.active{
background-image:url(../images/module-common/danger-xz.png);
}
.fd-dqzt-1.active{
background-image:url(../images/module-common/lamp_r_xz.png);
}
.fd-dqzt-2.active{
background-image:url(../images/module-common/lamp_o_xz.png);
}
.fd-dqzt-3.active{
background-image:url(../images/module-common/lamp_g_xz.png);
}.fd-dqzt-0{
background-image:url(../images/module-common/danger01.png);
}
.fd-dqzt-1{
background-image:url(../images/module-common/lamp_r.png);
}
.fd-dqzt-2{
background-image:url(../images/module-common/lamp_o.png);
}
.fd-dqzt-3{
background-image:url(../images/module-common/lamp_g.png);
}/**/
.fd-dqzt-0.active{
background-image:url(../images/module-common/danger-xz.png);
}
.fd-dqzt-1.active{
background-image:url(../images/module-common/lamp_r_xz.png);
}
.fd-dqzt-2.active{
background-image:url(../images/module-common/lamp_o_xz.png);
}
.fd-dqzt-3.active{
background-image:url(../images/module-common/lamp_g_xz.png);
}
$('#jsDqlx').on('click','.js-item-dqzt .fd-pitem-trigger',function () {
var _this = $(this).parent();
var _data=_this.data('data');
console.log(_data)
// 子数据
var _childrenData=_data.dqzt;
if(_this.hasClass('active')){
_this.removeClass('active');
}else {
_this.addClass('active');
}
// 增加选中状态
//_this.addClass('active');
});