Full width hero unit in Twitter Bootstrap

后端 未结 2 1929
谎友^
谎友^ 2021-02-02 16:31

In this example layout I want only hero unit to be 100% wide and rest within the default grid. For example, check this site. It has only the hero unit part (showcase area) in fu

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 16:49

    Well the answer is right but whenever you resize the site, hero-unit will then change to have spaces around (20px right, 20px left) because all the elements are bound to this body has paddings in @media max-width: 767px. Just do the code below to fix it too:

    @media (max-width: 767px) { .hero-container { margin-right: -20px; margin-left: -20px; } }

提交回复
热议问题