

サンプル
使えそうなホバー(:hover)さん。
画像編です。
LP作成時に役立ちます。
CSS
Normal → Zoom In #1
1 2 3 4 5 6 7 | .s_zoomin_ 01 figure img { transform : scale ( 1 ); transition : . 3 s ease-in-out; } .s_zoomin_ 01 figure:hover img { transform : scale ( 1.3 ); } |
Normal → Zoom In #2
1 2 3 4 5 6 7 | .s_zoomin_ 02 figure img { width : 100% ; transition : . 3 s ease-in-out; } .s_zoomin_ 02 figure:hover img { width : 120% ; } |
Zoom Out #1 → Normal
1 2 3 4 5 6 7 | .s_zoomout_ 01 figure img { transform : scale ( 1.3 ); transition : . 3 s ease-in-out; } .s_zoomout_ 01 figure:hover img { transform : scale ( 1 ); } |
Zoom Out #2 → Normal
1 2 3 4 5 6 7 | .s_zoomout_ 02 figure img { width : 120% ; transition : . 3 s ease-in-out; } .s_zoomout_ 02 figure:hover img { width : 100% } |
Normal → Slide
1 2 3 4 5 6 7 8 | .s_slide_ 01 figure img { margin-left : 30px ; transform : scale ( 1.3 ); transition : . 3 s ease-in-out; } .s_slide_ 01 figure:hover img { margin-left : 0 ; } |
Normal → Rotate + Zoom In
1 2 3 4 5 6 7 | .s_rotate_ 01 figure img { transform : rotate ( 0 ) scale ( 1 ); transition : . 3 s ease-in-out; } .s_rotate_ 01 figure:hover img { transform : rotate ( 15 deg) scale ( 1.4 ); } |
Normal → Blur
1 2 3 4 5 6 7 | .s_blur_ 01 figure img { filter : blur( 5px ); transition : . 3 s ease-in-out; } .s_blur_ 01 figure:hover img { filter : blur( 0 ); } |
Normal → Blur + Gray Scale
1 2 3 4 5 6 7 | .s_blur_ 02 figure img { filter : grayscale( 0 ) blur( 0 ); transition : . 3 s ease-in-out; } .s_blur_ 02 figure:hover img { filter : grayscale( 100% ) blur( 3px ); } |
Gray Scale → Normal
1 2 3 4 5 6 7 | .s_gray_ 01 figure img { filter : grayscale( 100% ); transition : . 3 s ease-in-out; } .s_gray_ 01 figure:hover img { filter : grayscale( 0 ); } |
Sepia → Normal
1 2 3 4 5 6 7 | .s_sepia_ 01 figure img { filter : sepia( 100% ); transition : . 3 s ease-in-out; } .s_sepia_ 01 figure:hover img { filter : sepia( 0 ); } |
Normal → Opacity #1
1 2 3 4 5 6 7 | .s_opa_ 01 figure img { opacity : 1 ; transition : . 3 s ease-in-out; } .s_opa_ 01 figure:hover img { opacity : . 5 ; } |
Normal → Opacity #2
1 2 3 4 5 6 7 8 9 10 | .s_opa_ 02 figure { background : #111 ; } .s_opa_ 02 figure img { opacity : 1 ; transition : . 3 s ease-in-out; } .s_opa_ 02 figure:hover img { opacity : . 5 ; } |
Normal → Flash
1 2 3 4 5 6 7 8 9 10 11 12 | .s_flash_ 01 figure:hover img { opacity : 1 ; animation : flash 1.5 s; } @keyframes flash { 0% { opacity : . 3 ; } 100% { opacity : 1 ; } } |
Normal → Shine
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | .s_shine_ 01 figure { position : relative ; } .s_shine_ 01 figure::before { content : '' ; position : absolute ; top : 0 ; left : -75% ; z-index : 2 ; display : block ; width : 50% ; height : 100% ; background : linear-gradient (to right , rgba ( 255 , 255 , 255 , 0 ) 0% , rgba ( 255 , 255 , 255 ,. 3 ) 100% ); transform : skewX ( -25 deg); } .s_shine_ 01 figure:hover::before { animation : shine . 75 s; } @keyframes shine { 100% { left : 125% ; } } |
Normal → Circle
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 | .s_circle_ 01 figure { position : relative ; } .s_circle_ 01 figure::before { content : '' ; position : absolute ; top : 50% ; left : 50% ; z-index : 2 ; display : block ; width : 0 ; height : 0 ; background : rgba ( 255 , 255 , 255 ,. 2 ); border-radius : 100% ; transform : translate ( -50% , -50% ); opacity : 0 ; } .s_circle_ 01 figure:hover::before { animation : circle . 75 s; } @keyframes circle { 0% { opacity : 1 ; } 40% { opacity : 1 ; } 100% { width : 200% ; height : 200% ; opacity : 0 ; } } |
さいごに

