对于一个简单的段落,我有一些流氓代码,由于某些原因,在手机上观看时不会缩小。
字体大小设置为14px,但在手机上,它会显示较大,而网站的其余部分文字会缩小到适合。
我错过了什么吗?这是页面http://www.dantecreative.com/Peter
此外,在手机上,当移动设备上的视图以及页脚和页眉从左到右不像在桌面上那样覆盖时,右侧会有很大的间隙。
这是有问题的CSS -
#main #mainblack #petetext p {
color:#FFFFFF;
font-size:14px;
margin-left: 60px;
font-family:Verdana, sans-serif;
line-height: 21px;
}
和HTML
<div id="petetext">
<h1>Why Peter? Why not!</h1>
<p>
Initially attracted here by a passion for mountain biking and skiing, Dave has grown to love Whistler for so much more – it’s incredible community of positive people who live life to the fullest. This community, coupled with Whistler’s beautiful mountains and natural environment, give this world-class resort an indescribable energy, rivaled by no other. Dave has combined this passion with knowledge, experience and effective communication and negotiating skills to become one of Whistler’s top producing agents.
</p>
<p class="blue">
....................................................................................................................................
</p>
希望有人可以提供帮助。像往常一样,我确信这很简单。
答案 0 :(得分:1)
body {
-webkit-text-size-adjust: 100%;
}
答案 1 :(得分:0)
正如尼克所说,你不应该需要那些链ID。如果你想要的是为id petetex中包含的
添加一些样式,你只需要在你的css中:#petetex p 您可以在此jsfiddle文件1上进行检查。它也适用于手机。祝你好运!
#petetext p{
color:red;
font-size:16px;
margin-left: 60px;
font-family:Verdana, sans-serif;
line-height: 21px;
}