Thumbnail 组件主要用于显示图片列表及图文混排列表。
演示图标版权归微软 Bing 所有。
在 <img>
添加 .am-thumbnail
类;也可以在 <img>
外面添加一个容器,如 <div>
、<figure>
、<a>
等,再将 class 添加到容器上。
<div class="am-g">
<div class="am-u-sm-4">
<img class="am-thumbnail" src="..." alt=""/>
</div>
<div class="am-u-sm-4">
<a href="#" class="am-thumbnail">
<img src="..." alt=""/>
</a>
</div>
<div class="am-u-sm-4">
<figure class="am-thumbnail">
<img src="..." alt=""/>
</figure>
</div>
</div>
添加 AVG Grid class 同时添加 .am-thumbnails
。
<ul class="am-avg-sm-3 am-thumbnails">
<li>
<img class="am-thumbnail" src="..." alt=""/>
</li>
<li>
<a href="#" class="am-thumbnail">
<img src="..." alt=""/>
</a>
</li>
<li>
<figure class="am-thumbnail">
<img src="..." alt=""/>
</figure>
</li>
</ul>
<div class="am-g">
<div class="am-u-sm-4">
<div class="am-thumbnail">
<img src="..." alt=""/>
<h3 class="am-thumbnail-caption">图片标题 #1</h3>
</div>
</div>
<div class="am-u-sm-4">
<a href="#" class="am-thumbnail">
<img src="..." alt=""/>
<figcaption class="am-thumbnail-caption">图片标题 #2</figcaption>
</a>
</div>
<div class="am-u-sm-4">
<figure class="am-thumbnail">
<img src="..." alt=""/>
<figcaption class="am-thumbnail-caption">图片标题 #3</figcaption>
</figure>
</div>
</div>
在am-thumbnail
内加入.am-caption
可以添加任何类型的HTML内容标题、段落、或按钮。
<div class="am-g">
<div class="am-u-sm-6">
<div class="am-thumbnail">
<img src="..." alt=""/>
<div class="am-thumbnail-caption">
<h3>图片标题</h3>
<p>...</p>
<p>
<button class="am-btn am-btn-primary">按钮</button>
<button class="am-btn am-btn-default">按钮</button>
</p>
</div>
</div>
</div>
<div class="am-u-sm-6">
<div class="am-thumbnail">
<img src="..." alt=""/>
<div class="am-thumbnail-caption">
<h3>图片标题</h3>
<p>...</p>
<p>
<button class="am-btn am-btn-primary">按钮</button>
<button class="am-btn am-btn-default">按钮</button>
</p>
</div>
</div>
</div>
</div>