画廊

Bootstrap画廊 - 免费示例、模板和教程

使用Bootstrap 5创建的响应式画廊。图片画廊、视频画廊、照片画廊、全页、电子商务、灯箱、滑块、缩略图等。


静态图片

使用静态图片的示例。

要了解更多,请阅读 图片文档

        
            
          <!-- Gallery -->
          <div class="row">
            <div class="col-lg-4 col-md-12 mb-4 mb-lg-0">
              <img
                src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/Nature/4-col/img%20(73).webp"
                class="w-100 shadow-1-strong rounded mb-4"
                alt="Boat on Calm Water"
              />

              <img
                src="https://mdbcdn.b-cdn.net/img/Photos/Vertical/mountain1.webp"
                class="w-100 shadow-1-strong rounded mb-4"
                alt="Wintry Mountain Landscape"
              />
            </div>

            <div class="col-lg-4 mb-4 mb-lg-0">
              <img
                src="https://mdbcdn.b-cdn.net/img/Photos/Vertical/mountain2.webp"
                class="w-100 shadow-1-strong rounded mb-4"
                alt="Mountains in the Clouds"
              />

              <img
                src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/Nature/4-col/img%20(73).webp"
                class="w-100 shadow-1-strong rounded mb-4"
                alt="Boat on Calm Water"
              />
            </div>

            <div class="col-lg-4 mb-4 mb-lg-0">
              <img
                src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/Nature/4-col/img%20(18).webp"
                class="w-100 shadow-1-strong rounded mb-4"
                alt="Waves at Sea"
              />

              <img
                src="https://mdbcdn.b-cdn.net/img/Photos/Vertical/mountain3.webp"
                class="w-100 shadow-1-strong rounded mb-4"
                alt="Yosemite National Park"
              />
            </div>
          </div>
          <!-- Gallery -->
        
        
    





灯箱

如果您需要高级选项,可以使用MDBootstrap的 燈箱組件

注意: 此组件需要 MDBootstrap Pro 包。

        
            
          <div class="lightbox" data-mdb-lightbox-init>
            <div class="row">
              <div class="col-lg-6">
                <img
                  src="https://mdbcdn.b-cdn.net/img/Photos/Thumbnails/Slides/1.webp"
                  data-mdb-img="https://mdbcdn.b-cdn.net/img/Photos/Slides/1.webp"
                  alt="Table Full of Spices"
                  class="w-100 mb-2 mb-md-4 shadow-1-strong rounded"
                />
                <img
                  src="https://mdbcdn.b-cdn.net/img/Photos/Thumbnails/Square/1.webp"
                  data-mdb-img="https://mdbcdn.b-cdn.net/img/Photos/Square/1.webp"
                  alt="Coconut with Strawberries"
                  class="w-100 shadow-1-strong rounded"
                />
              </div>
              <div class="col-lg-6">
                <img
                  src="https://mdbcdn.b-cdn.net/img/Photos/Thumbnails/Vertical/1.webp"
                  data-mdb-img="https://mdbcdn.b-cdn.net/img/Photos/Vertical/1.webp"
                  alt="Dark Roast Iced Coffee"
                  class="w-100 shadow-1-strong rounded"
                />
              </div>
            </div>
          </div>