微端页面缩放比:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
防止IE默认选中Quirks文档模式:
<meta http-equiv="X-UA-Compatible" content="ie=edge">
防止ban图背景失真可设置最小宽(版心宽度min-width:1000px;):
width: 100%;
height: 500px;
background: url(../image/comp-ban.png)center no-repeat;
margin: 0 auto;
兼容IE7仿input placeholder效果:
<input class="agen-foot-inp01" type="text" value="您的姓名" "if(this.value === '您的姓名') this.value = '';" "if(this.value === '') this.value = '您的姓名';">
或者写一个p标签模仿一个占位.calc-placeholder(父元素如li,div).calc-inps-tog(input框).calc-show(p标签)
$('.calc-placeholder .calc-inps-tog').focus(function(){
$(this).siblings('.calc-show').hide();
});
$('.calc-placeholder .calc-show').click(function(){
$(this).hide();
$(this).siblings('.calc-inps-tog').focus();
});
$('.calc-placeholder .calc-inps-tog').blur(function(){
var aa = $(this).val();
if (aa === '') {
$(this).siblings('.calc-show').show();
}else{
$(this).siblings('.calc-show').hide();
}
});
if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.match(/8./i)=="8."){
$('.calc-show').show();
}
else if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.match(/9./i)=="9."){
$('.calc-show').show();
}
侧边跟随版心移动:
.fixed{
width: 100px;
height: 300px;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
right: 50%;
margin-right: -600px;
}