This time I will share jQuery Plugin and tutorial about Material Inspired Expanding Card with jQuery and CSS3, hope it will help you in programming stack.
A Material Design inspired morphing card concept which uses several CSS3 properties and a little jQuery to transform an action button into a content panel when toggled.
How to use it:
1. Add the action button and content panel into a container element as displayed below.
01 |
< div class = "container" > |
2. The main CSS / CSS3 styles.
05 |
display : inline- block ; |
08 |
-webkit-transition: all 0.7 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ); |
09 |
transition: all 0.7 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ); |
18 |
background-color : #03A9F4 ; |
24 |
box-shadow: 0 3px 6px rgba( 0 , 0 , 0 , 0.16 ), 0 3px 6px rgba( 0 , 0 , 0 , 0.23 ); |
26 |
-webkit-transition: all 0.2 s 0.45 s, height 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ) 0.25 s, max-width 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ) 0.35 s, width 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ) 0.35 s; |
27 |
transition: all 0.2 s 0.45 s, height 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ) 0.25 s, max-width 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ) 0.35 s, width 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ) 0.35 s; |
31 |
-webkit-transform: translateY( 100% ); |
32 |
-ms-transform: translateY( 100% ); |
33 |
transform: translateY( 100% ); |
38 |
-webkit-transition: -webkit-transform 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ), opacity 0.2 s 0.2 s; |
39 |
transition: transform 0.2 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ), opacity 0.2 s 0.2 s; |
42 |
.content .head { padding : 0 0 20px 0 ; } |
46 |
color : rgba( 0 , 0 , 0 , 0.87 ); |
47 |
background-color : #FFF ; |
51 |
box-sizing: border-box; |
3. The core CSS / CSS3 styles for the morphing effect.
02 |
-webkit-transform: rotate( 585 deg); |
03 |
-ms-transform: rotate( 585 deg); |
04 |
transform: rotate( 585 deg); |
05 |
-webkit-transition: all 0.5 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ); |
06 |
transition: all 0.5 s cubic-bezier( 0.4 , 0 , 0.2 , 1 ); |
10 |
box-shadow: 0 10px 20px rgba( 0 , 0 , 0 , 0.19 ), 0 6px 6px rgba( 0 , 0 , 0 , 0.17 ); |
source : jqueryscript.net