兼容IE7仿input placeholder效果css跟随版心移动

微端页面缩放比:

<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;
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值