html - 部分的移动 View 看起来很奇怪

标签 html css twitter-bootstrap mobile

我无法解决移动 View 布局问题。当我通过移动设备查看我的网站时,该部分会相应缩小,而不是显示全宽图像和堆叠。如何修复它,以便在通过移动设备查看时,这些框位于彼此之上?我正在使用 Bootstrap。

Desktop

Mobile

<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>

最佳答案

可能是你给了图形或任何其他元素,图片嵌套在一个固定的高度中,你可以在 css 中用 height: auto;

修复

关于html - 部分的移动 View 看起来很奇怪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37142091/

相关文章:

html - 从事件导航栏选项卡更改背景颜色

放入容器 div 时,Jquery 定向转换不起作用

html - 使用 css 对齐不同的字段而不是使用表格

javascript - jQuery resize() 函数导致堆栈溢出异常

javascript - 在 ember js 上安装 Bootstrap 4

html - 读取 : Centering 2 divs vertically

jquery - 上传/显示本地存储中的多个文件

javascript - Raphaël.js 中停止动画并重置元素的位置

html - 将显示表 : working on Firefox, 的 4 个单元格集中在一起在 Chrome 上不起作用

c# - 对话框模式在 asp.net core mvc 5 中不起作用