1

現在、iPodtouchで作業しているWebページがあります。Webページコンテナは幅480ピクセル(450 + 30パディング)で、2つのdivがあり、それぞれに1行のテキストがあります。

テキストが1divしかない場合は、コンピューターと同じように、テキストが1行に表示されます。ただし、2番目のdivを追加すると、iPod touchはテキストを(両方のdivで)はるかに大きくして、テキストが次の行に移動するようにします。

追加するdivの数に関係なく、テキストが同じ(小さい)サイズのままであることを確認するにはどうすればよいですか?私のコンピューターと同じようにしたいと思います。ユーザーはズームできる必要があります。

css:

body{
    font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size:15px;
    margin:0px;
 }

.container{
    padding:15px 15px 1px 15px;
    width:450px;
    background:white;
    overflow:hidden;
}

.quote{
    padding-bottom:3px; 
    font-style:italic; 
    text-align:center; 
    width:450px; 
    overflow:hidden; 
  }

html:

<meta id="meta" name="viewport" content="width=device-width; initial-scale=1.0" />

<body >
    <div class= "container">
        <div class = "quote">"I want to be on one line and so does the other line. Even if two."</div>
        <div class = "quote">"I want to be on one line and so does the other line. Even if two."</div>
     </div>
</body>
4

1 に答える 1

0

以下をクラスコンテナに追加しましたが、動作します。これをしない理由はありますか?他にどのような影響があるのか​​よくわからないので、ボディに追加しませんでした。

-webkit-text-size-adjust: 100%;
于 2013-03-03T17:55:06.770 に答える