南强小屋 Design By 杰米
                                今天给大家带来一款基于css3的列表toggle特效。右上角一个按钮,当列表不显示的时候,单击按钮列表动画出现,当列表显示时,单击按钮,列表动画消失,效果图如下:
实现的代码。
htm代码:
复制内容到剪贴板- <div class='menu'>
 - toggle visibility</div>
 - <ul class='list reverse'>
 - <li class='item'>Item 1</li>
 - <li class='item'>Item 2</li>
 - <li class='item'>Item 3</li>
 - <li class='item'>Item 4</li>
 - <li class='item'>Item 5</li>
 - <li class='item'>Item 6</li>
 - <li class='item'>Item 7</li>
 - <li class='item'>Item 8</li>
 - <li class='item'>Item 9</li>
 - <li class='item'>Item 10</li>
 - <li class='item'>Item 11</li>
 - <li class='item'>Item 12</li>
 - </ul>
 
css3代码:
CSS Code复制内容到剪贴板- * {
 - -moz-box-sizing: border-box;
 - box-sizing: border-box;
 - }
 - body {
 - margin: 0;
 - padding: 0;
 - font-family: 'Avenir Next';
 - background: #000;
 - color: white;
 - }
 - .menu {
 - background: tomato;
 - padding: 20px;
 - position: absolute;
 - z-index: 1;
 - height: 55px;
 - top: 0;
 - rightright: 50px;
 - }
 - .list {
 - -webkit-perspective: 100vw;
 - perspective: 100vw;
 - width: 100vw;
 - height: 100vh;
 - display: -webkit-flex;
 - display: -ms-flexbox;
 - display: flex;
 - -webkit-flex-flow: column wrap;
 - -ms-flex-flow: column wrap;
 - flex-flow: column wrap;
 - }
 - .list.hidden {
 - pointer-events: none;
 - }
 - .list.hidden .item {
 - -webkit-animation: disappear both;
 - animation: disappear both;
 - -webkit-animation-direction: alternate;
 - animation-direction: alternate;
 - }
 - .list.reverse {
 - -webkit-flex-flow: row-reverse wrap-reverse;
 - -ms-flex-flow: row-reverse wrap-reverse;
 - flex-flow: row-reverse wrap-reverse;
 - }
 - .item {
 - font-size: 30px;
 - padding: 20px;
 - height: 100px;
 - width: calc(100vw / 3);
 - height: calc(100vh / 4);
 - -webkit-animation: appear both;
 - animation: appear both;
 - }
 - .item:nth-child(1) {
 - background: #008a8a;
 - -webkit-animation-delay: 0.03333s !important;
 - -webkit-animation-duration: 0.1s !important;
 - }
 - .item:nth-child(2) {
 - background: #009494;
 - -webkit-animation-delay: 0.06667s !important;
 - -webkit-animation-duration: 0.2s !important;
 - }
 - .item:nth-child(3) {
 - background: #009f9f;
 - -webkit-animation-delay: 0.1s !important;
 - -webkit-animation-duration: 0.3s !important;
 - }
 - .item:nth-child(4) {
 - background: #00a9a9;
 - -webkit-animation-delay: 0.13333s !important;
 - -webkit-animation-duration: 0.4s !important;
 - }
 - .item:nth-child(5) {
 - background: #00b3b3;
 - -webkit-animation-delay: 0.16667s !important;
 - -webkit-animation-duration: 0.5s !important;
 - }
 - .item:nth-child(6) {
 - background: #00bdbd;
 - -webkit-animation-delay: 0.2s !important;
 - -webkit-animation-duration: 0.6s !important;
 - }
 - .item:nth-child(7) {
 - background: #00c7c7;
 - -webkit-animation-delay: 0.23333s !important;
 - -webkit-animation-duration: 0.7s !important;
 - }
 - .item:nth-child(8) {
 - background: #00d2d2;
 - -webkit-animation-delay: 0.26667s !important;
 - -webkit-animation-duration: 0.8s !important;
 - }
 - .item:nth-child(9) {
 - background: #00dcdc;
 - -webkit-animation-delay: 0.3s !important;
 - -webkit-animation-duration: 0.9s !important;
 - }
 - .item:nth-child(10) {
 - background: #00e6e6;
 - -webkit-animation-delay: 0.33333s !important;
 - -webkit-animation-duration: 1s !important;
 - }
 - .item:nth-child(11) {
 - background: #00f0f0;
 - -webkit-animation-delay: 0.36667s !important;
 - -webkit-animation-duration: 1.1s !important;
 - }
 - .item:nth-child(12) {
 - background: #00fafa;
 - -webkit-animation-delay: 0.4s !important;
 - -webkit-animation-duration: 1.2s !important;
 - }
 - @-webkit-keyframes appear {
 - from {
 - opacity: 0;
 - -webkit-transform: scale(0.8);
 - transform: scale(0.8);
 - }
 - to {
 - opacity: 1;
 - -webkit-transform: scale(1);
 - transform: scale(1);
 - }
 - }
 - @keyframes appear {
 - from {
 - opacity: 0;
 - -webkit-transform: scale(0.8);
 - transform: scale(0.8);
 - }
 - to {
 - opacity: 1;
 - -webkit-transform: scale(1);
 - transform: scale(1);
 - }
 - }
 - @-webkit-keyframes disappear {
 - from {
 - opacity: 1;
 - -webkit-transform: scale(1);
 - transform: scale(1);
 - }
 - to {
 - opacity: 0;
 - -webkit-transform: scale(0.9) rotateX(0deg) translateZ(-1500px);
 - transform: scale(0.9) rotateX(0deg) translateZ(-1500px);
 - }
 - }
 - @keyframes disappear {
 - from {
 - opacity: 1;
 - -webkit-transform: scale(1);
 - transform: scale(1);
 - }
 - to {
 - opacity: 0;
 - -webkit-transform: scale(0.9) rotateX(0deg) translateZ(-1500px);
 - transform: scale(0.9) rotateX(0deg) translateZ(-1500px);
 - }
 - }
 
                                    标签:
                                        
                                css3特效,toggle特效
南强小屋 Design By 杰米
                            
                                广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
                        免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
南强小屋 Design By 杰米
                        暂无一款基于css3的列表toggle特效实例教程的评论...
                                    稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
                        