【问题标题】:What will <div="container-fluid"> do in amp-story?<div="container-fluid"> 在 amp-story 中会做什么?
【发布时间】:2018-10-16 22:27:11
【问题描述】:

http://stackoverflow.com/questions//container-fluid-vs-container

https://www.jquery-az.com/bootstrap-container-and-container-fluid-what-is-the-difference/

.container 类是固定宽度的容器。这并不意味着 它没有响应。它反应灵敏;但是,它是基于 屏幕尺寸。屏幕尺寸包括:

xs for extra small devices (used for less than 768 e.g smart phones, mobile etc.)
sm for small screens (From 768 pixels and up e.g. tablets)
md for the medium screen (>= 992 pixels. Desktops/Laptops)
lg for large screens (>= 1200. Pixels e.g. large desktops)

container-fluid 类将占据视口的整个宽度。如果 您使用容器流体并调整浏览器大小,您可能会注意到 它里面的内容会随着每个像素调整以充分利用 可用宽度。

【问题讨论】:

    标签: twitter-bootstrap containers amp-html amp-story


    【解决方案1】:

    默认情况下,它什么也不做,因为这不是amp-story 的一部分。

    这个类来自 Twitter Bootstrap,所以我在你的问题中添加了[twitter-bootstrap] 标签。您需要内联 Bootstrap CSS,而不是使用 Bootstrap 组件或 JavaScript。由于这需要内联大约 20kb 的 CSS,因此编写自己的媒体查询可能会更高效。

    另外,amp-story 处理响应的方式可能与 Bootstrap 不兼容,因为 amp-story 桌面 UI 在浏览器窗口中有多个较小的“视口”,Bootstrap 无法理解。

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-23
    • 1970-01-01
    相关资源
    最近更新 更多