每日一坑之20180914:
<input type="button" value="test" class="disabled" disabled>
input 设置 disabled 属性 之后,在ios手机上发现按钮颜色变浅。是因为设置了disabled属性之后,按钮的透明度发生了变化。
解决方法如下
/* 第一种 */
.disabled {
-webkit-opacity:1;
opacity: 1;
}
/* 第二种 */
input[disabled],input:disabled{
background: #999999;
-webkit-opacity:1;
opacity: 1;
}
/* IE6 Using Javascript to add CSS class "disabled"*/
* html input.disabled{
background: #999999;
-webkit-opacity:1;
opacity: 1;
}
每日一学之20180917:
特别是在IOS的微信里,alert弹框会带上ip和域名,一下方式可以实现只弹你想要的内容
(function(){
window.alert = function(name){
var iframe = document.createElement("IFRAME");
iframe.style.display="none";
iframe.setAttribute("src", 'data:text/plain');
document.documentElement.appendChild(iframe);
window.frames[0].window.alert(name);
iframe.parentNode.removeChild(iframe);
}
})();
723

被折叠的 条评论
为什么被折叠?



