
兼容性问题
fb_01
思想践行者
展开
-
Chrome浏览器自动填充的表单如何去掉淡黄色背景???
原因:表单自动填充元素在chrome下会有一个默认样式原创 2015-12-08 13:30:46 · 4836 阅读 · 1 评论 -
事件冒泡的解决方案
1、事件冒泡: 在一个对象上触发某类事件(例如单击事件onclick事件),若果此对象定义了此事件的处理程序,那么就会调用这个处理程序;但是如果没有定义此事件的处理程序或者事件返回true,那么这个事件就会向这个对象的父级对象传播,从里到外,直至它被处理(父级对象所有同类事件都将被激活),或者它达到了对象层次的最顶层,即document对象(有的浏览器是window)。原创 2016-04-18 17:03:01 · 2736 阅读 · 0 评论 -
background-size兼容IE8解决方案
1、通过滤镜的方法 body{ background: url(../images/login_register/login-register-background.jpg) no-repeat center; -webkit-background-size: cover; -moz-background-size: cover; -o-bac原创 2015-12-09 10:14:27 · 19805 阅读 · 3 评论 -
移动端点击事件出现背景框以及pc端a标签点击时出现背景框???
1、原因:移动端事件响应时会有默认的背景框颜色,a标签active时也有默认的背景框颜色。2、解决方法:移动端让背景框不显示-webkit-tap-highlight-color:rgba(0,0,0,0); -moz-tap-highlight-color:rgba(0,0,0,0); -ms-tap-highlight-color:rgba(0,0,0,0); -o-t原创 2015-12-18 16:31:16 · 9155 阅读 · 0 评论 -
Android移动端input标签type=submit时,点击时会光标会进入按钮。。。
1、原因:input有一个私有属性user-modify:read-write-plaintext-only;2、解决方法:重写user-modify属性或者input[type="submit"]{ -webkit-user-modify: read-plaintext-only; -moz-user-modify: read-plaintext-only;原创 2015-12-19 13:52:13 · 2047 阅读 · 0 评论 -
pc端Button 按钮的点击时候出现蓝色边框。。。
1、原因:受button标签的outline属性的影响2、解决方法:添加css属性button{ outline:none;}原创 2015-12-19 14:17:23 · 916 阅读 · 0 评论 -
元素垂直居中方法
一、固定height的元素居中1、使用绝对定位(兼容所有浏览器,浏览器窗口缩小时,部分内容会消失)居中元素 .content { position: absolute; top: 50%; left: 50%;原创 2016-04-05 10:48:03 · 404 阅读 · 0 评论 -
完美解决textarea字数限制
1、input、textarea都有maxlength属性,但是textarea不兼容ie8/9,input兼容ie8/9。2、同时绑定onchange、onkeydown、onkeyup,ie8/9下解决不了右键粘贴问题。3、废话少说,上代码……20/20 /*字数限制*/ $("#area").on("input propertychange", f原创 2016-03-31 15:56:36 · 35769 阅读 · 3 评论 -
移动端input框输入文本时不居中。。。
1、原因:因为有元素有line-height属性2、解决方法:去掉line-height属性3、注:要写ie的兼容性line-height:30px\9;原创 2015-12-19 14:09:45 · 3609 阅读 · 0 评论 -
placeholder兼容IE8解决方案
1、原因:placeholder是h5的新属性,老版本的IE浏览器不支持此属性。2、解决方法:jQuery三方插件 jquery-placeholder3、快速开始: test input{ width: 100px; height: 50px; border: 1px solid red; } .placeholder原创 2015-12-11 09:19:00 · 12732 阅读 · 1 评论