モバイルビューレイアウトの問題が発生しました。モバイル経由でサイトを表示すると、セクションがフルサイズの画像を表示する代わりに縮小されて積み重ねられます。モバイル経由で見たときにボックスが互いの上になるように修正するにはどうすればよいですか?私はブートストラップを使用しています。あなたは、あなたがCSSで修正することができます。図や絵が固定hieghtにネストされている他の要素を与えたことセクションのモバイルビューが奇妙に見える
<section class="health" id="health">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="section-title st-center">
<h3>Places to exercise</h3>
</div>
<div class="grid">
<figure class="portfolio-item">
<img src="images/eastcoastpark.jpg" alt="east coast park"/>
<figcaption>
<h2>Nice <span>Lily</span></h2>
<p>Lily likes to play with crayons and pencils</p>
</figcaption>
</figure>
<figure class="portfolio-item">
<img src="images/eastcoastpark.jpg" alt="east coast park"/>
<figcaption>
<h2><span>EAST COAST PARK</span></h2>
<p>Long stretch of running and cycling/skating paths, it’s one of Singapore’s best spots to go jogging or bike riding.</p>
</figcaption>
</figure>
<figure class="portfolio-item">
<img src="images/eastcoastpark.jpg" alt="east coast park"/>
<figcaption>
<h2>Nice <span>Lily</span></h2>
<p>Lily likes to play with crayons and pencils</p>
</figcaption>
</figure>
<figure class="portfolio-item">
<img src="images/eastcoastpark.jpg" alt="east coast park"/>
<figcaption>
<h2>Nice <span>Lily</span></h2>
<p>Lily likes to play with crayons and pencils</p>
</figcaption>
</figure>
<figure class="portfolio-item">
<img src="images/eastcoastpark.jpg" alt="east coast park"/>
<figcaption>
<h2>Nice <span>Lily</span></h2>
<p>Lily likes to play with crayons and pencils</p>
</figcaption>
</figure>
<figure class="portfolio-item">
<img src="images/eastcoastpark.jpg" alt="east coast park"/>
<figcaption>
<h2>Nice <span>Lily</span></h2>
<p>Lily likes to play with crayons and pencils</p>
</figcaption>
</figure>
</div>
</div>
</div>
</div>
</section>
.health { パディング:2em; } 。グリッド図{ 位置:相対; float:left; オーバーフロー:非表示。 text-align:center; カーソル:ポインタ; 幅:33.33333333%; } .grid figure img { 位置:相対; display:ブロック; 最小高さ:100%; 最大幅:100%; 不透明度:1; -webkit-transition:不透明度0.3s、-webkit-transform 0.3s立方体ベジェ(0.645,0.045,0.355,1); 遷移:不透明度0.3s、変換0.3s立方体ベジェ(0.645,0.045,0.355,1)。 } – xtjnrchris
あなたのCSSを含めてくれてありがとうございますが、コメントとしてではなく、実際の質問テキストに追加してください。これはあまり読まれず、コメントが非常に簡単に失われる可能性があります。 – Serlite