手机访问网页自适应网页及图片高度

<html>
<head>
<title>城外诚家居</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<style type="text/css">
	body {
		height: 100%;
		width: 100%;
		margin: 0;
		padding: 0;
	}
	img{max-width: 100%;height: auto;width: auto\9;}
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (城外诚家居-01.jpg) -->
<table id="__01" width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<img src="images/index_01.jpg" width="100%" height="68" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_02.jpg" width="100%" height="73" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_03.jpg" width="100%" height="81" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_04.jpg" width="100%" height="88" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_05.jpg" width="100%" height="95" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_06.jpg" width="100%" height="95" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_07.jpg" width="100%" height="89" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_08.jpg" width="100%" height="96" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_09.jpg" width="100%" height="97" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_10.jpg" width="100%" height="108" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_11.jpg" width="100%" height="157" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_12.jpg" width="100%" height="96" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_13.jpg" width="100%" height="116" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_14.jpg" width="100%" height="130" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_15.jpg" width="100%" height="90" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_16.jpg" width="100%" height="202" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_17.jpg" width="100%" height="117" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_18.jpg" width="100%" height="332" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_19.jpg" width="100%" height="148" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/index_20.jpg" width="100%" height="102" alt=""></td>
	</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>

 

关键在这段代码:img{max-width: 100%;height: auto;width: auto\9;}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值