<divclass="row" id="example-row"><!-- Note the "full-card" class which stands for only one card. Add multiple "full-card" for more cards. --><divclass="col-xs-12 col-md-4 full-card"><!-- This will be the card that is active. Note that there should only be one card active. --><divclass="flip-card active-card"><divclass="card label-info"><!-- The <h6> can also be a <img> which will be centered. --><h6>1</h6></div><!-- This will be the button to trigger an animation. You will have to hook it yourself! --><ahref="javascript:void(0)" class="btn btn-primary btn-fab btn-raised icon-material-replay" id="first"></a><divclass="well"><h1>Card 1</h1></div></div><divclass="flip-card"><divclass="card" style="background-color: #F1BF26;color: white;"><h6>2</h6></div><divclass="well"><h1>Card 2</h1></div></div><divclass="flip-card"><divclass="card alert-success"><h6>3</h6></div><divclass="well"><h1>Card 3</h1></div></div></div></div>
How to hook your cards
// Be sure to make a Flipper object first.varflipper=newFlipper(document.getElementById("example-row"));$('#first').click(function(e){// make sure you put logical href links for people without javascripte.preventDefault();flipper.setCards([{// there is only one column for this example. add more full cards and then add here dictionaries to switch them.cardIndex: "0",activeIndex: "1"}]);});
请发表评论