全球彩票平台_全球彩票注册平台|官网下载地址

热门关键词: 全球彩票平台,全球彩票注册平台,全球彩官网下载地址

【全球彩官网下载地址】播放器张开收起动画,

饿了么--VUE项目知识点总计,--vue项目知识点

  1. 在利用<transition></transition>时类名的组合如下:

    1 .move-enter-active, .move-leave-active {//带active的应该写在眼下 2 transition: all 0.4s linear; 3 transform: translate3D(0, 0, 0) rotate(0); 4 opacity: 1; 5 } 6 .move-enter, .move-leave-active {//此处应该是 -leave-active 不是-leave 7 transform: translate3D(24px, 0, 0) rotate(180deg); 8 opacity: 0; 9 }

1. 在接纳transition/transition时类名的结缘如下: 1 .move-enter-active, .move-leave-active {// 带active的应该...

全球彩官网下载地址 1

  1. 在接纳<transition></transition>时类名的结合如下:

    1 .move-enter-active, .move-leave-active {//带active的应该写在前边 2 transition: all 0.4s linear; 3 transform: translate3D(0, 0, 0) rotate(0); 4 opacity: 1; 5 } 6 .move-enter, .move-leave-active {//此处应该是 -leave-active 不是-leave 7 transform: translate3D(24px, 0, 0) rotate(180deg); 8 opacity: 0; 9 }

1.前言

在月尾的时候,发了CSS3热身实战–过渡与动画片(达成绚烂下拉,手风琴,无缝滚动)。js的代码库也发过三次,两篇文章。此前也写了css3的热身实战,既然热身完了,是时候最初封装css3的代码库了,比较起js的代码库,css3的代码库的逻辑性就越来越简明了!能够说只要打上注释和一张效果图就足以让大家清楚了个中的规律了!
本身写代码库的时候,动画效果首要是参谋了四个开源项目,nec,hover.css,animate.css那八个项指标质量不行的高,建议我们去询问。
源码已经停放github上边了,我们能够去看,也款待大家star一下!ec-css。

自家提议那三个库实际不是叫大家去拿外人的代码,稍微修改一下,也许直接拷贝到本人的门类上,然后就视为自身的项目。我是让大家去看外人的代码,学习人家的实现形式恐怕动画片效果,然后再用本人的法门贯彻,当然假如把外人的类别,增删改查到万象更新的程度,那个自家个人以为能够说是投机的品类了!重申一点,不要直接复制别人的代码,放到本身的类型上,然后正是自个儿开垦的,那是欠钟情旁人的战果,对本人的技术水平升高的辅助也相当少。笔者写小说,即使也会提交代码,不过本人的指标是提供我们参照他事他说加以考察的,希望给让大家学习到知识照旧发散思维,写出更加好的著述。在此之前也说过,我写文章的目的是授人以渔,不是授人以鱼

动画片2:歌曲图片在由mini-player过渡到normal-player的动画

全球彩官网下载地址 2

那个动画使用transition的轩然大波函数实现。

<transition name="normal">

         v-on:enter="enter"

全球彩官网下载地址,         v-on:after-enter="afterEnter"

         v-on:leave="leave"

         v-on:after-leave="afterLeave"

>

methods: {

        //设置过渡踏入成功时的零件状态

       enter:function(el, done){

             // ...

            done()

       },

      //设置过渡踏向成功未来的机件状态

      afterEnter:function(el){

             // ...

       },

     //设置过渡离开完结时地组件状态

      leave:function(el, done){

              // ...

           done()

      },

      //设置过渡离开实现现在的组件状态

      afterLeave:function(el){

           // ...

      }

}

在enter函数中,设置图片的位移和推广减少等动画片。须求演示图片从左下角mini-player图片的职分位移至中游cdWrapper的职位,况兼扩充减弱相应的翻番。由于必要中间的卡通帧,使用create-keyframe-animation插件

使用_getPosAndScale函数来得到图片位移的x,y和松手减少比例scale,函数重返{x, y, scale}

在enter函数中,设置animation动画,注册和平运动作动画:

enter(el, done) {

       let {x, y, scale} = this._getPosAndScale()

       let animation = {

           0: {

                 transform: `translate3d(${x}px, ${y}px, 0) scale(${scale})`

            },

           60: {

                transform: 'translate3d(0, 0 ,0) scale(1.1)'

            },

          100: {

               transform: `translate3d(0, 0, 0) scale(1)`

            }

     }

    animations.registerAnimation({

         name: 'move',

         animation,

         presets: {

              duration: 400,

              easing: 'linear'

         }

     })

    animations.runAnimation(this.$refs.cdWrapper, 'move', done)

}

在afterEnter函数中,unregisterAnimation况且消除成分style的animation:

afterEnter() {

      animations.unregisterAnimation('move')

       this.$refs.cdWrapper.style.animation = ''

}

在leave函数中,由于没有须要中间帧的动画片,能够使用js直接操作成分:

leave(el, done) {

     this.$refs.cdWrapper.style.transition = 'all 0.4s'

     let {x, y, scale} = this._getPosAndScale()

     this.$refs.cdWrapper.style[transform] = `translate3d(${x}px, ${y}px, 0)      scale(${scale})`

      this.$refs.cdWrapper.addEventListener('transitionend', done)

}

一如既往的,在afterLeave函数中,要求消除动画的样式:

afterLeave() {

     this.$refs.cdWrapper.style.transition = ''

     this.$refs.cdWrapper.style[transform] = ''

}

1.在vue中通过在要素上增添ref=‘abc-abc’,然后经过this.$refs.abcabc就足以得到原生dom成分,不过在新版的vue中属性ref的值不能够加多-,增多的话会报错。

全球彩官网下载地址 3

2-1-4位移变化

全球彩官网下载地址 4

html

JavaScript

<span class="ech-t">up</span> <span class="ech-b">bottom</span> <span class="ech-l">left</span> <span class="ech-r">right</span>

1
2
3
4
<span class="ech-t">up</span>
<span class="ech-b">bottom</span>
<span class="ech-l">left</span>
<span class="ech-r">right</span>

css

.ech-t,.ech-bottom,.ech-top,.ech-right{ transition: all .4s; } .ech-t:hover { transform: translate3d(0, -10px, 0); } .ech-b:hover { transform: translate3d(0, 10px, 0); } .ech-l:hover { transform: translate3d(-10px, 0, 0); } .ech-r:hover { transform: translate3d(10px, 0, 0); }

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.ech-t,.ech-bottom,.ech-top,.ech-right{
    transition: all .4s;
}
.ech-t:hover {
    transform: translate3d(0, -10px, 0);
}
.ech-b:hover {
    transform: translate3d(0, 10px, 0);
}
.ech-l:hover {
    transform: translate3d(-10px, 0, 0);
}
.ech-r:hover {
    transform: translate3d(10px, 0, 0);
}

动画片1:播放器最上端标题部分由上至下滑动,播放器底部由下至上滑动

全球彩官网下载地址 5

给播放器所在div包裹上transition,并指定name为normal

<transition name="normal">

    <div class="normal-player">

                //.......

               <div class="top></div>

               <div class="bottom></div>

    </div>

</transition>

零件过渡进度中,会有四个CSS类名进行切换,那多个类名与地点transition的name属性有关,举例name="normal",会有如下多个CSS类名:

normal-enter:步入过渡的起来情况,成分被插入时生效,只行使一帧后随即删除;

normal-enter-active:进入过渡的了断状态,成分被插入时就立见功能,在接入进程一挥而就今后移除;

normal-leave:离开过渡的初阶景况,成分被去除时接触,只行使一帧后立即删除;

normal-leave-active:离开过渡的结束状态,元素被去除时生效,离开过渡完结之后被删去;

全球彩官网下载地址 6

从地方多个类名能够看来,fade-enter-active和fade-leave-active在全体步向或离开进度中都有效,所以CSS的transition属性在那三个类下进展设置。

&.normal-enter-active, &.normal-leave-active

      transition: all 0.4s

      .top, .bottom

              transition: all 0.4s cubic-bezier(0.86, 0.18, 0.82, 1.32)

&.normal-enter, &.normal-leave-to

       opacity: 0

       .top

             transform: translate3d(0, -100px, 0)

       .bottom

           transform: translate3d(0, 100px, 0)

  1. 在运用<transition></transition>时类名的三结合如下:

    1 .move-enter-active, .move-leave-active {//带active的相应写在后面 2 transition: all 0.4s linear; 3 transform: translate3D(0, 0, 0) rotate(0); 4 opacity: 1; 5 } 6 .move-enter, .move-leave-active {//此处应该是 -leave-active 不是-leave 7 transform: translate3D(24px, 0, 0) rotate(180deg); 8 opacity: 0; 9 }

1.在vue中通过在要素上增添ref=‘abc-abc’,然后经过this.$refs.abcabc就足以博得原生dom成分,不过在新版的vue中属性ref的值不可能增多-,加多的话会报错。

4.未知索求

好了,说完了hover动画和预设动画,作者付出的时候,发掘了那样局地相映生辉的事物,我也计划继续商量,也提议大家玩下,说不定几时做出了宏伟的事物!如上面包车型地铁板栗!

下边说的动画,不分hover动画和预设动画,大家只顾

点击歌曲时,出现播放器,为防止页面切换太刚毅,给播放器展开和吸取加多动画。

2-2-2.颜色上下划线变化

此处也是一大块一齐说,看代码大概会更乱,所以大家看代码的时候要更为静心注意。看代码看不知道,直接在github下载,然后运营文件,边调节和测试边看效用!那样大家就很轻巧驾驭了!

全球彩官网下载地址 7

html

JavaScript

<span class="ech-overline-l">overline-l</span> <span class="ech-overline-r">overline-r</span> <span class="ech-underline-l">underline-l</span> <span class="ech-underline-r">underline-r</span> <span class="ech-underline-c">underline-c</span> <span class="ech-underline-c-out">underline-c-out</span> <span class="ech-overline-c">overline-c</span> <span class="ech-overline-c-out">overline-c-out</span>

1
2
3
4
5
6
7
8
<span class="ech-overline-l">overline-l</span>
<span class="ech-overline-r">overline-r</span>
<span class="ech-underline-l">underline-l</span>
<span class="ech-underline-r">underline-r</span>
<span class="ech-underline-c">underline-c</span>
<span class="ech-underline-c-out">underline-c-out</span>
<span class="ech-overline-c">overline-c</span>
<span class="ech-overline-c-out">overline-c-out</span>

css

/*上写道和下划线变化 当前成分样式设置绝对固化*/ .ech-overline-r, .ech-overline-l, .ech-underline-r, .ech-underline-l, .ech-underline-c, .ech-overline-c, .ech-underline-c-out, .ech-overline-c-out{ position: relative; transition: all .3s; z-index: 1; } /*开端化:after:before大小和相对定位*/ .ech-overline-r:before, .ech-overline-l:before, .ech-underline-l:before, .ech-underline-r:before, .ech-underline-c:before, .ech-overline-c:before, .ech-underline-c:after, .ech-overline-c:after, .ech-underline-c-out:before, .ech-overline-c-out:before { position: absolute; transition: all .3s; content: ""; display: block; background: #09f; z-index: -1; height: 4px; width: 100%; transform: scaleX(0); } /*上涂抹 左右出去*/ .ech-overline-r:before { top: 0; left: 0; transform-origin: 100% 50%; } .ech-overline-l:before { top: 0; right: 0; transform-origin: 0 50%; } /*下划线 左右出来*/ .ech-underline-r:before { bottom: 0; left: 0; transform-origin: 100% 50%; } .ech-underline-l:before { bottom: 0; right: 0; transform-origin: 0% 50%; } /**上涂抹 下划线 居中步入**/ .ech-overline-c:before { top: 0; transform-origin: 0 50%; } .ech-overline-c:after { top: 0; transform-origin: 100% 50%; } .ech-underline-c:before { bottom: 0; transform-origin: 0 50%; } .ech-underline-c:after { bottom: 0; transform-origin: 100% 50%; } .ech-overline-c:before, .ech-underline-c:before { left: 0; } .ech-overline-c:after, .ech-underline-c:after { right: 0; } /*上划拉 下划线-居中出来 */ .ech-overline-c-out:before { top: 0; left: 0; right: 0; margin: auto; } .ech-underline-c-out:before { bottom: 0; left: 0; right: 0; margin: auto; } /*hover效果*/ .ech-overline-c:hover:after, .ech-overline-c:hover:before, .ech-underline-c:hover:after, .ech-underline-c:hover:before { transform: scaleX(.51); } .ech-overline-l:hover:before, .ech-overline-r:hover:before, .ech-underline-l:hover:before, .ech-underline-r:hover:before, .ech-underline-c-out:hover:before, .ech-overline-c-out:hover:before { transform: scaleX(1); }

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*上划线和下划线变化 当前元素样式设置相对定位*/
.ech-overline-r, .ech-overline-l, .ech-underline-r, .ech-underline-l, .ech-underline-c, .ech-overline-c, .ech-underline-c-out, .ech-overline-c-out{
    position: relative;
    transition: all .3s;
    z-index: 1;
}
/*初始化:after:before大小和绝对定位*/
.ech-overline-r:before, .ech-overline-l:before, .ech-underline-l:before, .ech-underline-r:before, .ech-underline-c:before, .ech-overline-c:before, .ech-underline-c:after, .ech-overline-c:after, .ech-underline-c-out:before, .ech-overline-c-out:before {
    position: absolute;
    transition: all .3s;
    content: "";
    display: block;
    background: #09f;
    z-index: -1;
    height: 4px;
    width: 100%;
    transform: scaleX(0);
}
 
/*上划线 左右出来*/
.ech-overline-r:before {
    top: 0;
    left: 0;
    transform-origin: 100% 50%;
}
 
.ech-overline-l:before {
    top: 0;
    right: 0;
    transform-origin: 0 50%;
}
 
/*下划线 左右出来*/
.ech-underline-r:before {
    bottom: 0;
    left: 0;
    transform-origin: 100% 50%;
 
}
 
.ech-underline-l:before {
    bottom: 0;
    right: 0;
    transform-origin: 0% 50%;
}
 
/**上划线 下划线 居中进来**/
.ech-overline-c:before {
    top: 0;
    transform-origin: 0 50%;
}
 
.ech-overline-c:after {
    top: 0;
    transform-origin: 100% 50%;
}
 
.ech-underline-c:before {
    bottom: 0;
    transform-origin: 0 50%;
}
 
.ech-underline-c:after {
    bottom: 0;
    transform-origin: 100% 50%;
}
 
.ech-overline-c:before, .ech-underline-c:before {
    left: 0;
}
 
.ech-overline-c:after, .ech-underline-c:after {
    right: 0;
}
 
/*上划线 下划线-居中出去 */
.ech-overline-c-out:before {
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
}
 
.ech-underline-c-out:before {
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}
/*hover效果*/
.ech-overline-c:hover:after, .ech-overline-c:hover:before, .ech-underline-c:hover:after, .ech-underline-c:hover:before {
    transform: scaleX(.51);
}
 
.ech-overline-l:hover:before, .ech-overline-r:hover:before, .ech-underline-l:hover:before, .ech-underline-r:hover:before, .ech-underline-c-out:hover:before, .ech-overline-c-out:hover:before {
    transform: scaleX(1);
}

2-2-1.颜色块变化

全球彩官网下载地址 8

因为那块内容很像,小编就一大块一同说,大家看代码的时候要留意注意。看代码看不晓得,直接在github下载,然后运营文件,边调节和测验边看功用!那样大家就很轻松精通了!

html

JavaScript

<span class="ech-fade">fade</span> <span class="ech-fade-t">fade-t</span> <span class="ech-fade-b">fade-b</span> <span class="ech-fade-l">fade-l</span> <span class="ech-fade-r">fade-r</span> <span class="ech-bounce-t">bounce-t</span> <span class="ech-bounce-b">bounce-b</span> <span class="ech-bounce-l">bounce-l</span> <span class="ech-bounce-r">bounce-r</span> <span class="ech-fade-c-out">fade-c-out</span> <span class="ech-fade-c-in">fade-c-in</span> <span class="ech-fade-m-out">fade-m-out</span> <span class="ech-fade-m-in">fade-m-in</span>

1
2
3
4
5
6
7
8
9
10
11
12
13
<span class="ech-fade">fade</span>
<span class="ech-fade-t">fade-t</span>
<span class="ech-fade-b">fade-b</span>
<span class="ech-fade-l">fade-l</span>
<span class="ech-fade-r">fade-r</span>
<span class="ech-bounce-t">bounce-t</span>
<span class="ech-bounce-b">bounce-b</span>
<span class="ech-bounce-l">bounce-l</span>
<span class="ech-bounce-r">bounce-r</span>
<span class="ech-fade-c-out">fade-c-out</span>
<span class="ech-fade-c-in">fade-c-in</span>
<span class="ech-fade-m-out">fade-m-out</span>
<span class="ech-fade-m-in">fade-m-in</span>

css

/*近些日子元素设置绝对牢固*/ .ech-fade, .ech-fade-t, .ech-fade-b, .ech-fade-l, .ech-fade-r, .ech-fade-c-in, .ech-fade-m-in, .ech-fade-m-out, .ech-fade-c-out, .ech-bounce-t, .ech-bounce-b, .ech-bounce-r, .ech-bounce-l { position: relative; transition: all .3s; z-index: 1; } /*眼前因素的:before和:after设置相对定位*/ .ech-fade:before, .ech-fade-t:before, .ech-fade-b:before, .ech-fade-l:before, .ech-fade-r:before, .ech-fade-c-in:before, .ech-fade-m-in:before, .ech-fade-m-out:before, .ech-fade-c-in:after, .ech-fade-m-in:after, .ech-fade-c-out:before { position: absolute; transition: all .3s; content: ""; display: block; background: #09f; z-index: -1; width: 100%; height: 100%; } /*弹跳成分:before和:after设置相对定位和平运动动曲线*/ .ech-bounce-t:before, .ech-bounce-b:before, .ech-bounce-r:before, .ech-bounce-l:before { transition: all .3s; transition-timing-function: cubic-bezier(0.52, 1.7, 0.5, 0.4); position: absolute; content: ""; display: block; background: #09f; z-index: -1; width: 100%; height: 100%; } /*背景颜色和文字变化*/ .ech-fade:before { top: 0; left: 0; transform: scaleX(1); opacity: 0; } .ech-fade:hover:before { opacity: 1; } /*水彩从左至右变化*/ .ech-fade-l:before, .ech-bounce-l:before { top: 0; right: 0; transform-origin: 0 50%; transform: scaleX(0); } /*水彩从右至左变化*/ .ech-fade-r:before, .ech-bounce-r:before { top: 0; left: 0; transform-origin: 100% 50%; transform: scaleX(0); } /*水彩从上往下转移*/ .ech-fade-t:before, .ech-bounce-t:before { bottom: 0; left: 0; transform-origin: 50% 0; transform: scaleY(0); } /*水彩从下往上生成*/ .ech-fade-b:before, .ech-bounce-b:before { top: 0; left: 0; transform-origin: 50% 100%; transform: scaleY(0); } /*颜色垂直居中出去*/ .ech-fade-m-out:before { top: 0; bottom: 0; left: 0; margin: auto; transform: scaleY(0); } /*水平居中出去*/ .ech-fade-c-out:before { top: 0; right: 0; bottom: 0; left: 0; margin: auto; transform: scaleX(0); } .ech-fade-c-out:hover:before { transform: scaleX(1); } /*水平居中步入*/ .ech-fade-c-in:before { top: 0; left: 0; transform-origin: 0 50%; transform: scaleX(0); } .ech-fade-c-in:after { top: 0; right: 0; transform-origin: 100% 50%; transform: scaleX(0); } /*垂直居中跻身*/ .ech-fade-m-in:before { top: 0; left: 0; transform-origin: 50% 0; transform: scaleY(0); } .ech-fade-m-in:after { bottom: 0; left: 0; transform-origin: 50% 100%; transform: scaleY(0); } /*如今因素文字颜色变化*/ .ech-fade:hover, .ech-fade-t:hover, .ech-fade-b:hover, .ech-fade-l:hover, .ech-fade-r:hover, .ech-fade-c-in:hover, .ech-fade-m-in:hover, .ech-fade-m-out:hover, .ech-fade-c-out:hover, .ech-bounce-t:hover, .ech-bounce-b:hover, .ech-bounce-r:hover, .ech-bounce-l:hover { color: #fff; } /*笔直方向步入的:before变化(二分之一)*/ .ech-fade-m-in:hover:before, .ech-fade-m-in:hover:after { transform: scaleY(.51); } /*笔直方向步向的:before变化*/ .ech-fade-t:hover:before, .ech-fade-b:hover:before, .ech-fade-m-out:hover:before, .ech-bounce-b:hover:before, .ech-bounce-t:hover:before { transform: scaleY(1); } /*水平方向踏入的:before变化(四分之二)*/ .ech-fade-c-in:hover:before, .ech-fade-c-in:hover:after { transform: scaleX(.51); } /*水平方向步入的:before变化*/ .ech-fade-l:hover:before, .ech-fade-r:hover:before,.ech-fade-c-out:hover:before, .ech-bounce-l:hover:before, .ech-bounce-r:hover:before { transform: scaleX(1); }

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*当前元素设置相对定位*/
.ech-fade, .ech-fade-t, .ech-fade-b, .ech-fade-l, .ech-fade-r, .ech-fade-c-in, .ech-fade-m-in, .ech-fade-m-out, .ech-fade-c-out, .ech-bounce-t, .ech-bounce-b, .ech-bounce-r, .ech-bounce-l {
    position: relative;
    transition: all .3s;
    z-index: 1;
}
/*当前元素的:before和:after设置绝对定位*/
.ech-fade:before, .ech-fade-t:before, .ech-fade-b:before, .ech-fade-l:before, .ech-fade-r:before, .ech-fade-c-in:before, .ech-fade-m-in:before, .ech-fade-m-out:before, .ech-fade-c-in:after, .ech-fade-m-in:after, .ech-fade-c-out:before {
    position: absolute;
    transition: all .3s;
    content: "";
    display: block;
    background: #09f;
    z-index: -1;
    width: 100%;
    height: 100%;
}
/*弹跳元素:before和:after设置绝对定位和运动曲线*/
.ech-bounce-t:before, .ech-bounce-b:before, .ech-bounce-r:before, .ech-bounce-l:before {
    transition: all .3s;
    transition-timing-function: cubic-bezier(0.52, 1.7, 0.5, 0.4);
    position: absolute;
    content: "";
    display: block;
    background: #09f;
    z-index: -1;
    width: 100%;
    height: 100%;
}
 
/*背景颜色和文字变化*/
.ech-fade:before {
    top: 0;
    left: 0;
    transform: scaleX(1);
    opacity: 0;
}
 
.ech-fade:hover:before {
    opacity: 1;
}
 
/*颜色从左至右变化*/
.ech-fade-l:before, .ech-bounce-l:before {
    top: 0;
    right: 0;
    transform-origin: 0 50%;
    transform: scaleX(0);
}
/*颜色从右至左变化*/
.ech-fade-r:before, .ech-bounce-r:before {
    top: 0;
    left: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
}
 
/*颜色从上往下变化*/
.ech-fade-t:before, .ech-bounce-t:before {
    bottom: 0;
    left: 0;
    transform-origin: 50% 0;
    transform: scaleY(0);
}
/*颜色从下往上变化*/
.ech-fade-b:before, .ech-bounce-b:before {
    top: 0;
    left: 0;
    transform-origin: 50% 100%;
    transform: scaleY(0);
}
 
/*颜色垂直居中出去*/
.ech-fade-m-out:before {
    top: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    transform: scaleY(0);
}
 
/*水平居中出去*/
.ech-fade-c-out:before {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    transform: scaleX(0);
}
 
.ech-fade-c-out:hover:before {
    transform: scaleX(1);
}
 
/*水平居中进来*/
.ech-fade-c-in:before {
    top: 0;
    left: 0;
    transform-origin: 0 50%;
    transform: scaleX(0);
}
 
.ech-fade-c-in:after {
    top: 0;
    right: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
}
 
/*垂直居中进来*/
.ech-fade-m-in:before {
    top: 0;
    left: 0;
    transform-origin: 50% 0;
    transform: scaleY(0);
}
 
.ech-fade-m-in:after {
    bottom: 0;
    left: 0;
    transform-origin: 50% 100%;
    transform: scaleY(0);
}
/*当前元素文字颜色变化*/
.ech-fade:hover, .ech-fade-t:hover, .ech-fade-b:hover, .ech-fade-l:hover, .ech-fade-r:hover, .ech-fade-c-in:hover, .ech-fade-m-in:hover, .ech-fade-m-out:hover, .ech-fade-c-out:hover, .ech-bounce-t:hover, .ech-bounce-b:hover, .ech-bounce-r:hover, .ech-bounce-l:hover {
    color: #fff;
}
/*垂直方向进来的:before变化(一半)*/
.ech-fade-m-in:hover:before, .ech-fade-m-in:hover:after {
    transform: scaleY(.51);
}
/*垂直方向进来的:before变化*/
.ech-fade-t:hover:before, .ech-fade-b:hover:before, .ech-fade-m-out:hover:before, .ech-bounce-b:hover:before, .ech-bounce-t:hover:before {
    transform: scaleY(1);
}
/*水平方向进来的:before变化(一半)*/
.ech-fade-c-in:hover:before, .ech-fade-c-in:hover:after {
    transform: scaleX(.51);
}
/*水平方向进来的:before变化*/
.ech-fade-l:hover:before, .ech-fade-r:hover:before,.ech-fade-c-out:hover:before, .ech-bounce-l:hover:before, .ech-bounce-r:hover:before {
    transform: scaleX(1);
}

声明

1.上面将会看到很五个像样全球彩官网下载地址 9这么的矩形,都以span标签,样式都以交给的css

span{ cursor: pointer; height: 40px; line-height: 40px; text-align: center; display: inline-block; color: #333; background: #ccc; min-width: 80px; padding: 0 10px; margin: 10px; }

1
2
3
4
5
6
7
8
9
10
11
12
span{
        cursor: pointer;
        height: 40px;
        line-height: 40px;
        text-align: center;
        display: inline-block;
        color: #333;
        background: #ccc;
        min-width: 80px;
        padding: 0 10px;
        margin: 10px;
    }

2.有关class命名格局,l代表left,r代表right,t代表top,b代表bottom,c代表center,m代表middle。切记

文章相比较长,但是说得正是两点,我们看得也应有会赶快
1.写出有些hover动画和预设动画的运作效果,况且贴出代码
2.意识多少个卡通组成,和增加Infiniti动画,反向动画,会有差异的成效,并且三番五次钻探,看下能否钻探出不等同的事物!

2-3-3摇曳效果

全球彩官网下载地址 10

html

JavaScript

<span class="ech-wobble-c">wobble-c</span> <span class="ech-wobble-t">wobble-t</span> <span class="ech-wobble-b">wobble-b</span>

1
2
3
<span class="ech-wobble-c">wobble-c</span>
<span class="ech-wobble-t">wobble-t</span>
<span class="ech-wobble-b">wobble-b</span>

css

.ech-wobble-t, .ech-skew-r-t, .ech-skew-l-t { transform-origin: 0 100%; } .ech-wobble-b, .ech-skew-r-b, .ech-skew-l-b { transform-origin: 100% 0; } .ech-wobble-c:hover, .ech-wobble-t:hover,.ech-wobble-b:hover { animation: wobble-x 1s ease-in-out; } @keyframes wobble-x { 16.65% { -webkit-transform: skew(-12deg); transform: skew(-12deg); } 33.3% { -webkit-transform: skew(10deg); transform: skew(10deg); } 49.95% { -webkit-transform: skew(-6deg); transform: skew(-6deg); } 66.6% { -webkit-transform: skew(4deg); transform: skew(4deg); } 83.25% { -webkit-transform: skew(-2deg); transform: skew(-2deg); } 100% { -webkit-transform: skew(0); transform: skew(0); } }

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.ech-wobble-t, .ech-skew-r-t, .ech-skew-l-t {
    transform-origin: 0 100%;
}
 
.ech-wobble-b, .ech-skew-r-b, .ech-skew-l-b {
    transform-origin: 100% 0;
}
 
.ech-wobble-c:hover, .ech-wobble-t:hover,.ech-wobble-b:hover {
    animation: wobble-x 1s ease-in-out;
}
@keyframes wobble-x {
    16.65% {
        -webkit-transform: skew(-12deg);
        transform: skew(-12deg);
    }
    33.3% {
        -webkit-transform: skew(10deg);
        transform: skew(10deg);
    }
    49.95% {
        -webkit-transform: skew(-6deg);
        transform: skew(-6deg);
    }
    66.6% {
        -webkit-transform: skew(4deg);
        transform: skew(4deg);
    }
    83.25% {
        -webkit-transform: skew(-2deg);
        transform: skew(-2deg);
    }
    100% {
        -webkit-transform: skew(0);
        transform: skew(0);
    }
}

本文由全球彩票平台发布于全球彩官网下载地址Web前端,转载请注明出处:【全球彩官网下载地址】播放器张开收起动画,

TAG标签: 全球彩票平台
Ctrl+D 将本页面保存为书签,全面了解最新资讯,方便快捷。