兼容等问题 及 代码规范

1.ie7 不兼容 标签> 标签的写法

 

2.Text-indent: ie7对于非文字不生效,子集有继承特性,建议用padding-left:取代

 

3. 搜狗浏览器:

不支持max-height:auto;  试用max-height:0;)

 

4./*去掉a 触发时的虚线 及 去除手机点触a时的底色*/

a{  blr:expression(this.onFocus=this.blur());/*ie---虚线*/

  outline: none;/*ff--虚线*/

  -webkit-tap-highlight-color: transparent;-webkit-touch-callout: none;-webkit-user-select: none;  /*去底色*/  }

 

5.定义placeholder的兼容写法

input::-webkit-input-placeholder {color: #cdcdcd !important;font-style:italic!important; /* WebKit browsers */}
input:-moz-placeholder {color: #cdcdcd !important;font-style:italic!important; /* Mozilla Firefox 4 to 18 */}
input::-moz-placeholder {color: #cdcdcd !important;font-style:italic!important;* Mozilla Firefox 19+ */}
input:-ms-input-placeholder {color: #cdcdcd !important;font-style:italic!important; /* Internet Explorer 10+ */}

 

6.项目里页面首尾出现多余空行

首先考虑样式问题,看是否有边距等。如果不是

再考虑编码问题。解决:将页面保存为utf-8 无bom格式,详细百度。

如果还不能解决,有可能是页面应用插件,生成多余标签而占位,继续仔细排查。

 

7.规范:a 标签不能嵌套a 标签

 

8.盒子内第一个元素的margin-top,会传递给父元素,应该避免,可以给父元素应用padding-top来解决。

 

9.如果更改代码后,调试总不生效,考虑缓存问题,或者页面为保存,或者文件未关联成功。 

一直在完善。。。未完待续

 

posted on 2017-05-02 14:45  alanaZ  阅读(124)  评论(0)    收藏  举报

导航