2017-07-01 16 views
1

2つの '1ページのウェブサイト'をプロジェクトのコードペーンにコーディングしました(2つ目は終了していません。モバイルデバイスの不適切なスケーリングと不適切なスケーリング

私のコードを見ると、それほど大きな違いはありません。なぜ、2番目のページがモバイルデバイス上でゴミに見えるのかわかりません。 私は左から右にスクロールすることができ、ページの全体の大きさを見ることはできず、ズームアウトすることもできません。

Working First One

Not Working Second One

(注:私はこれらのためにブートストラップを使用)

body { 
 
    font-family: Raleway; 
 
    background-image: no-repeat center center fixed; 
 
    background-repeat: no-repeat; 
 
    background-size: cover; 
 
    background-position: center; 
 
    background-color: #92b8db; 
 
    color: white; 
 
    display: block; 
 
    margin: 0; 
 
} 
 

 
h1 { 
 
    text-align: center; 
 
    font-size: 70px; 
 
    margin: 2% 0 3.5% 0; 
 
    text-transform: uppercase; 
 
} 
 

 
nav { 
 
    text-align: center; 
 
    display: inline-block; 
 
    margin: 25px; 
 
    float: none; 
 
    overflow: none; 
 
} 
 

 
li, 
 
ul { 
 
    text-decoration: none; 
 
    display: inline-block; 
 
    margin: 5px 20px; 
 
} 
 

 
h2 { 
 
    margin: 25px 0 0 20%; 
 
} 
 

 
p { 
 
    font-size: 20px; 
 
    margin: 5px 10% 20px 10%; 
 
    text-align: justify; 
 
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> 
 
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet"> 
 
<meta name="viewport" content="width=device-width, initial-scale=1" , user-scalable=no> 
 

 

 
<body background="http://static.tumblr.com/38d4fa35aa182890b82bb598a50c8d8b/hti7sqq/7h2orgi26/tumblr_static_4g8ybvq3e4ys8sk4sgowscko8.jpg"> 
 

 
    <div class="container-fluid"> 
 
    <div class="row"> 
 

 
     <div class="col"> 
 
     <h2>Heartcube</h2> 
 
     </div> 
 

 
     <div class="col"> 
 
     </div> 
 

 
     <div class="col"> 
 

 
     <nav> 
 
      <ul> 
 
      <li>About</li> 
 
      <li>Portfolio</li> 
 
      <li>Contact</li> 
 
      </ul> 
 
     </nav> 
 

 
     </div> 
 
    </div> 
 

 
    <div class="container-fluid container"> 
 
     <h1> Betti Bremm</h1> 
 
     <p> 
 
     We are giants... 
 
     </p> 
 
    </div> 
 
    </div> 
 
</body>

+0

を役に立てば幸い –

答えて

1

あなたは "ズーム" することはできません理由はあなたのためでありますユーザースケーラブルに "いいえ " - その部分を削除すると、できるはずです。あなただけ

meta name="viewport" content="width=device-width, initial-scale=1"> 

でビューポートメタを残す場合は

これで十分です。

ユーザースケーラブルのメタは、コードブックで動作しないサイトのHTML設定でのみ設定されます(codepenのマニュアルヘッドのメタ設定は考慮されていないようです) 。あなたのブートストラップもこのコードに2回含まれています。

User scaleable no meta

は私の答えを編集これは

関連する問題