• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Xerdi/Material-Design-Flipper: Animated cards in bootstrap material design.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Xerdi/Material-Design-Flipper

开源软件地址(OpenSource Url):

https://github.com/Xerdi/Material-Design-Flipper

开源编程语言(OpenSource Language):

CSS 92.5%

开源软件介绍(OpenSource Introduction):

Material-Design-Flipper

Animated cards in bootstrap material design.

Dependencies

Bootstrap material design

Put this in your <head>

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="material/css/ripples.min.css" rel="stylesheet">
<link href="material/css/material-wfont.min.css" rel="stylesheet">

<link href="css/flipper.css" rel="stylesheet">

Put this at the bottom of your <body>

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

<script src="material/js/ripples.min.js"></script>
<script src="material/js/material.min.js"></script>

<script src="js/flipper.js"></script>

Usage

How to make the cards

<div class="row" id="example-row">
  <!-- Note the "full-card" class which stands for only one card. Add multiple "full-card" for more cards.  -->
  <div class="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. -->
    <div class="flip-card active-card">
      <div class="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! -->
      <a href="javascript:void(0)" class="btn btn-primary btn-fab btn-raised icon-material-replay" id="first"></a>
      <div class="well">
        <h1>Card 1</h1>
      </div>
    </div>
    <div class="flip-card">
      <div class="card" style="background-color: #F1BF26;color: white;">
        <h6>2</h6>
      </div>
      <div class="well">
        <h1>Card 2</h1>
      </div>
    </div>
    <div class="flip-card">
      <div class="card alert-success">
        <h6>3</h6>
      </div>
      <div class="well">
        <h1>Card 3</h1>
      </div>
    </div>
  </div>
</div>

How to hook your cards

//  Be sure to make a Flipper object first.
var flipper = new Flipper(document.getElementById("example-row"));

$('#first').click(function(e) {
  // make sure you put logical href links for people without javascript
  e.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"
  }]);
});



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap