在HTML文件中引入。
<link rel="stylesheet" type="text/css" href="stackedCards.css"/> <script src="stackedCards.js"><script>
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>
javascript
var stackedCard = new stackedCards({ selector: '.mycards', layout: "slide", transformOrigin: "center", }); stackedCard.init();
扇形堆叠轮播图
var stackedCard = new stackedCards({ selector: '.stacked-cards', layout: "fanOut", transformOrigin: "bottom", }); stackedCard.init();
html结构中外层div要加类样式,不然css白引啊,这说明文档有点坑啊
<div class="mycards stacked-cards"></div>回复