var stackedCard = new stackedCards({
selector: '.stacked-cards',
layout: "slide",
transformOrigin: "center",
});
stackedCard.init();
var stackedCard = new stackedCards({
selector: '.stacked-cards',
layout: "fanOut",
transformOrigin: "bottom",
});
stackedCard.init();
1. HTML代码
<div class="mycards">
<ul>
<li>your content</li>
<li>your content</li>
<li>your content</li>
<li>your content</li>
<li>your content</li>
</ul>
</div>
2. 将stackedCards.css和stackedCards.js插入到<head> stackedCards.js引入到</body>之前
<link rel="stylesheet" type="text/css" href="stackedCards.css"/>
<script src="stackedCards.js"><script>
3. 初始化stackedCards
var stackedCard = new stackedCards({
selector: '.mycards',
layout: "slide",
transformOrigin: "center",
});
stackedCard.init();