媒体Media

媒体 Media - 图1

  1. <div class="media">
  2. <div class="img"><img src="imgurl"></div>
  3. <div class="content">
  4. <h5>iPhone Cases</h5>
  5. <p>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</p>
  6. </div>
  7. </div>

自定义内容Custom

可任意添加文本内容

媒体 Media - 图2

  1. <div class="media">
  2. <div class="img"><img src="imgurl"></div>
  3. <div class="content">
  4. <dl class="baselist">
  5. <dt>iPhone Cases</dt>
  6. <dd>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</dd>
  7. <dd>iPhone 6 Cases</dd>
  8. <dd>iPhone 4 Cases</dd>
  9. <dd>iPhone 5 Cases</dd>
  10. <dd>Samsung Cases</dd>
  11. <dd>iPad Cases</dd>
  12. </dl>
  13. <button type="button" class="btn bg-navy">Quick view</button>
  14. </div>
  15. </div>

对齐Align

添加class="tc"使文本居中对齐,添加class="tr"使文本向右对齐

媒体 Media - 图3

水平排列Horizontal

媒体 Media - 图4

  1. Left:
  2. <div class="media left">
  3. <div class="img"><img src="imgurl"></div>
  4. <div class="content">
  5. <h5>iPhone Cases</h5>
  6. <p>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</p>
  7. <button type="button" class="btn bg-navy">Quick view</button>
  8. </div>
  9. </div>
  10. Right:
  11. <div class="media right">
  12. ...
  13. </div>

响应式复位Response Reset

通过预定义的class="reset-m"、class="reset-s"来对中、小屏幕作布局调整例:添加class="reset-s",即媒体元素默认为自定义的水平排列,视窗像素小于750px则清除水平排列恢复原状

媒体 Media - 图5

  1. <div class="media left reset-m">
  2. <div class="img"><img src="imgurl"></div>
  3. <div class="content">
  4. <h5>iPhone Cases</h5>
  5. <p>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</p>
  6. <button type="button" class="btn bg-navy">Quick view</button>
  7. </div>
  8. </div>
  9. <div class="media left reset-s">
  10. ...
  11. </div>

叠加Overlay

添加class="overlays"转换为叠加模式,添加class="darken"使图片变暗,需额外定义文本元素的颜色,注意:叠加模式不能与水平排列共同使用

媒体 Media - 图6

  1. Basic
  2. <div class="media overlay">
  3. <div class="img"><img src="imgurl"></div>
  4. <div class="content">
  5. <h5>iPhone Cases</h5>
  6. <p>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</p>
  7. <button type="button" class="btn bg-navy">Quick view</button>
  8. </div>
  9. </div>
  10. Darken:
  11. <div class="media overlay darken">
  12. <div class="img"><img src="imgurl"></div>
  13. <div class="content">
  14. <h5 class="c-fff">Business Cards</h5>
  15. <p class="c-fff">Browse all of our office essentials to keep you organized while showing off your individual style.</p>
  16. <button type="button" class="btn bg-red">Quick view</button>
  17. </div>
  18. </div>

圆角Radius

添加class="radius"转换为圆角效果,包含叠加模式

媒体 Media - 图7

  1. Basic
  2. <div class="media radius">
  3. <div class="img"><img src="imgurl"></div>
  4. <div class="content">
  5. <h5>iPhone Cases</h5>
  6. <p>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</p>
  7. <button type="button" class="btn bg-navy">Quick view</button>
  8. </div>
  9. </div>
  10. Overlay
  11. <div class="media overlay radius">
  12. ...
  13. </div>

滑动放大图片Zoom

添加class="zoom"使图片增加滑动放大效果,包含叠加模式

媒体 Media - 图8

  1. Basic
  2. <div class="media zoom">
  3. <div class="img"><img src="imgurl"></div>
  4. <div class="content">
  5. <h5>iPhone Cases</h5>
  6. <p>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</p>
  7. <button type="button" class="btn bg-navy">Quick view</button>
  8. </div>
  9. </div>
  10. Overlay
  11. <div class="media overlay zoom">
  12. ...
  13. </div>

滑动淡入文本Fadein

添加class="fadein"使文本增加滑动淡入效果,可与滑动放大图片效果叠加,注意:滑动淡入效果仅叠加模式下生效

媒体 Media - 图9

  1. Basic
  2. <div class="media overlay fadein">
  3. <div class="img"><img src="imgurl"></div>
  4. <div class="content">
  5. <h5>iPhone Cases</h5>
  6. <p>Keep your smartphone safe from bumps, bruises, drops, and more with our covers.</p>
  7. <button type="button" class="btn bg-navy">Quick view</button>
  8. </div>
  9. </div>
  10. Darken:
  11. <div class="media overlay darken fadein">
  12. <div class="img"><img src="imgurl"></div>
  13. <div class="content">
  14. <h5 class="c-fff">Business Cards</h5>
  15. <p class="c-fff">Browse all of our office essentials to keep you organized while showing off your individual style.</p>
  16. <button type="button" class="btn bg-red">Quick view</button>
  17. </div>
  18. </div>