- 主题:请教一个iPhone手机自适应网页宽度的问题
网页html源代码里面有
<head>
<title></title>
<meta content="text/html; charset=utf-8" http-equiv="content-type" /><meta name="viewport"content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
</head>
在iOS9下网页宽度和手机宽度一样。
但是在iOS8下,纯文字网页宽度和手机一样,但如果加入表格,则宽度超出手机屏幕,需要左右滑动才能看全一行文字。
只懂简单的网站开发,请教各位大牛,这个应该怎么改html?不胜感激!
--
FROM 42.81.35.*
肯定是表格的CSS被限宽了
贴出来看看
【 在 azureatom (专注套利) 的大作中提到: 】
: 网页html源代码里面有
: <head>
: <title></title>
: ...................
--
FROM 119.145.141.*
谢谢,全部的html代码如下,body里面只有一个table,怀疑是<hr />影响?或者是<img>的width:572px影响?但iphone宽度不止600px吧?
<html>
<head>
<title></title>
<meta content="text/html; charset=utf-8" http-equiv="content-type" /><meta name="viewport"content="width=device-width, initial-scale=1, minimum-scale=0.3, maximum-scale=1.0, user-scalable=yes"/>
</head>
<body style="margin: 10px;">
<table border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td>
<p><span style="font-size:14px">点评:<br />
· 第二季度刚刚过去,尽管基金尚未公布持仓。</span></p>
<hr />
<p><strong><span style="font-size:16px">xxxxxxxxxxxxxx</span></strong></p>
</td>
</tr>
<tr>
<td><img alt="" src="/media/uploads/2016/07/03/b.png" style="height:75px; width:572px" /></td>
</tr>
<p><strong><span style="font-size:16px">后续进展</span></strong></p>
</td>
</tr>
</tbody>
</table>
</body>
</html>
【 在 woaipinr 的大作中提到: 】
: 肯定是表格的CSS被限宽了
: 贴出来看看
--
FROM 42.81.35.*
iphone的宽度是400px不到,375PX
【 在 azureatom (专注套利) 的大作中提到: 】
: 谢谢,全部的html代码如下,body里面只有一个table,怀疑是<hr />影响?或者是
<img>的width:572px影响?但iphone宽度不止600px吧?
: <html>
: <head>
: ...................
--
修改:woaipinr FROM 119.145.141.*
FROM 119.145.141.*
试了一下,确实是图片的影响。
请问应该加上什么,可以让图片自适应屏幕的宽度呢?
【 在 woaipinr 的大作中提到: 】
: iphone的宽度是400px不到,375PX
: <img>的width:572px影响?但iphone宽度不止600px吧?
--
FROM 42.81.35.*
<img alt="" src="/media/uploads/2016/07/03/b.png" style="width:98%;" />
【 在 azureatom (专注套利) 的大作中提到: 】
: 试了一下,确实是图片的影响。
: 请问应该加上什么,可以让图片自适应屏幕的宽度呢?
--
FROM 119.145.141.*
好的,谢谢。
刚设置了width的宽度为固定值,暂时先这么用着,以后再看看自适应宽度怎么弄。
【 在 woaipinr 的大作中提到: 】
: <img alt="" src="/media/uploads/2016/07/03/b.png" style="width:98%;" />
:
--
FROM 123.150.205.*