Hello friends, today with this article I am going to share with you a very effective Direction Aware 3D Hover Effect where as in my previous post I have shared two amazing article in which I have shared knowledge about Stacked Animated UI Level using CSS and Material Design Sign Up Form. These two article got too many apprication from our daily visitors hope you will like it too.
First of all I thought to do it by pure CSS but after that I change my mind and include JS too to make it working. jQuery given a age to this hover effect by making it 3D and direction aware hovering.
Without wasting time I am going to explore html, css and jquery code used to make this beautiful hover effect.
Markup(HTML Code):
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
<header> Â Â <div class='container'> Â Â Â Â <h1>Direction-aware hover effect</h1> Â Â Â Â <p>CSS & bits of JS</p> Â Â </div> </header> <div class='container'> Â Â <ul> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/1.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/2.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function. </p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/3.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/4.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/5.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/6.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/7.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/8.png) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/9.gif) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/10.gif) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/11.jpg) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â Â Â <li> Â Â Â Â Â Â <a class='normal' href='#'Â Â style="background:url(images/12.gif) no-repeat center center; background-size:cover;"> Â Â Â Â Â Â Â Â <svg viewBox='0 0 80 76' x='0px' y='0px'> Â Â Â Â Â Â Â Â Â Â <g> Â Â Â Â Â Â Â Â Â Â Â Â <path d='M 68.9708 24.8623 L 60.4554 2.3018 C 59.9641 0.7017 58.1628 -0.2583 56.5252 0.3817 L 1.9822 20.2222 C 0.3822 20.7022 -0.4179 22.6222 0.2222 24.2223 L 8.8624 47.7797 L 8.8624 35.1484 C 8.8624 29.5024 13.3425 24.8623 18.8857 24.8623 L 32.9442 24.8623 L 50.63 12.862 L 60.7829 24.8623 L 68.9708 24.8623 L 68.9708 24.8623 ZM 77.098 32.0625 L 18.8857 32.0625 C 17.2512 32.0625 16.0625 33.4511 16.0625 35.1484 L 16.0625 72.8491 C 16.0625 74.5477 17.2512 75.9375 18.8857 75.9375 L 77.098 75.9375 C 78.742 75.9375 79.9376 74.5477 79.9376 72.8491 L 79.9376 35.1484 C 79.9376 33.4511 78.742 32.0625 77.098 32.0625 L 77.098 32.0625 ZM 73.0626 68.0625 L 23.9375 68.0625 L 23.9375 61.0852 L 31.4704 43.7232 L 42.7696 57.6777 L 53.4138 46.8062 L 67.1695 41.9375 L 73.0626 55.0815 L 73.0626 68.0625 L 73.0626 68.0625 Z'></path> Â Â Â Â Â Â Â Â Â Â </g> Â Â Â Â Â Â Â Â </svg> Â Â Â Â Â Â </a> Â Â Â Â Â Â <div class='info'> Â Â Â Â Â Â Â Â <h3>CSS3 Transition Effect On Hover</h3> Â Â Â Â Â Â Â Â <p>We believe in transition, transform so that we can effect from small waves of jquery Animate Function.</p> Â Â Â Â Â Â </div> Â Â Â Â </li> Â Â </ul> </div> |
CSS Code:
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
@import url(https://fonts.googleapis.com/css?family=Bree+Serif); /* the important bits */ li { Â Â -webkit-perspective: 400px; Â Â Â Â Â Â Â Â Â Â perspective: 400px; } Â .info { Â Â -webkit-transform: rotate3d(1, 0, 0, 90deg); Â Â Â Â Â Â Â Â Â Â transform: rotate3d(1, 0, 0, 90deg); Â Â width: 100%; Â Â height: 100%; Â Â padding: 20px; Â Â position: absolute; Â Â top: 0; Â Â left: 0; Â Â border-radius: 4px; Â Â pointer-events: none; Â Â background-color: #F1C40F; } Â .in-top .info { Â Â -webkit-transform-origin: 50% 0%; Â Â Â Â Â Â Â Â Â Â transform-origin: 50% 0%; Â Â -webkit-animation: in-top 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: in-top 300ms ease 0ms 1 forwards; } Â .in-right .info { Â Â -webkit-transform-origin: 100% 0%; Â Â Â Â Â Â Â Â Â Â transform-origin: 100% 0%; Â Â -webkit-animation: in-right 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: in-right 300ms ease 0ms 1 forwards; } Â .in-bottom .info { Â Â -webkit-transform-origin: 50% 100%; Â Â Â Â Â Â Â Â Â Â transform-origin: 50% 100%; Â Â -webkit-animation: in-bottom 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: in-bottom 300ms ease 0ms 1 forwards; } Â .in-left .info { Â Â -webkit-transform-origin: 0% 0%; Â Â Â Â Â Â Â Â Â Â transform-origin: 0% 0%; Â Â -webkit-animation: in-left 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: in-left 300ms ease 0ms 1 forwards; } Â .out-top .info { Â Â -webkit-transform-origin: 50% 0%; Â Â Â Â Â Â Â Â Â Â transform-origin: 50% 0%; Â Â -webkit-animation: out-top 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: out-top 300ms ease 0ms 1 forwards; } Â .out-right .info { Â Â -webkit-transform-origin: 100% 50%; Â Â Â Â Â Â Â Â Â Â transform-origin: 100% 50%; Â Â -webkit-animation: out-right 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: out-right 300ms ease 0ms 1 forwards; } Â .out-bottom .info { Â Â -webkit-transform-origin: 50% 100%; Â Â Â Â Â Â Â Â Â Â transform-origin: 50% 100%; Â Â -webkit-animation: out-bottom 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: out-bottom 300ms ease 0ms 1 forwards; } Â .out-left .info { Â Â -webkit-transform-origin: 0% 0%; Â Â Â Â Â Â Â Â Â Â transform-origin: 0% 0%; Â Â -webkit-animation: out-left 300ms ease 0ms 1 forwards; Â Â Â Â Â Â Â Â Â Â animation: out-left 300ms ease 0ms 1 forwards; } Â @-webkit-keyframes in-top { Â Â from { Â Â Â Â -webkit-transform: rotate3d(-1, 0, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(-1, 0, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } Â @keyframes in-top { Â Â from { Â Â Â Â -webkit-transform: rotate3d(-1, 0, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(-1, 0, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } @-webkit-keyframes in-right { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, -1, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, -1, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } @keyframes in-right { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, -1, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, -1, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } @-webkit-keyframes in-bottom { Â Â from { Â Â Â Â -webkit-transform: rotate3d(1, 0, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(1, 0, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } @keyframes in-bottom { Â Â from { Â Â Â Â -webkit-transform: rotate3d(1, 0, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(1, 0, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } @-webkit-keyframes in-left { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 1, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 1, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } @keyframes in-left { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 1, 0, 90deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 1, 0, 90deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } } @-webkit-keyframes out-top { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(-1, 0, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(-1, 0, 0, 104deg); Â Â } } @keyframes out-top { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(-1, 0, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(-1, 0, 0, 104deg); Â Â } } @-webkit-keyframes out-right { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, -1, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, -1, 0, 104deg); Â Â } } @keyframes out-right { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, -1, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, -1, 0, 104deg); Â Â } } @-webkit-keyframes out-bottom { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(1, 0, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(1, 0, 0, 104deg); Â Â } } @keyframes out-bottom { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(1, 0, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(1, 0, 0, 104deg); Â Â } } @-webkit-keyframes out-left { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 1, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 1, 0, 104deg); Â Â } } @keyframes out-left { Â Â from { Â Â Â Â -webkit-transform: rotate3d(0, 0, 0, 0deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 0, 0, 0deg); Â Â } Â Â to { Â Â Â Â -webkit-transform: rotate3d(0, 1, 0, 104deg); Â Â Â Â Â Â Â Â Â Â Â Â transform: rotate3d(0, 1, 0, 104deg); Â Â } } /* you can ignore this ones */ ul { Â Â padding: 0; Â Â margin: 0 0 50px; } ul:after { Â Â content: ""; Â Â display: table; Â Â clear: both; } Â li { Â Â position: relative; Â Â float: left; Â Â width: 200px; Â Â height: 200px; Â Â margin: 5px; Â Â padding: 0; Â Â list-style: none; } li a { Â Â display: inline-block; Â Â vertical-align: top; Â Â text-decoration: none; Â Â border-radius: 4px; } li h3 { Â Â margin: 0; Â Â font-size: 16px; Â Â color: rgba(255, 255, 255, 0.9); } li p { Â Â font-size: 12px; Â Â line-height: 1.5; Â Â color: rgba(255, 255, 255, 0.8); } li .normal { Â Â width: 100%; Â Â height: 100%; Â Â color: rgba(52, 73, 94, 0.6); Â Â text-align: center; Â Â font-size: 50px; Â Â line-height: 200px; Â Â border:1px solid #fafafa; } li .normal svg { Â Â pointer-events: none; Â Â width: 50px; Â Â display:none; } li .normal svg path { Â Â fill: #FFCA28; } Â * { Â Â box-sizing: border-box; } Â body { Â Â background-color: #fff; } Â h1 { Â Â margin: 0 auto 5px; Â Â text-align: center; } Â h3 { Â Â font-family: 'Bree Serif', serif; } Â .container { Â Â width: 840px; Â Â margin: 0 auto; } Â header { Â Â font-family: 'Bree Serif', serif; Â Â text-align: center; Â Â margin: 50px 0 25px; Â Â color: #34495E; } header p { Â Â margin: 0; Â Â color: rgba(52, 73, 94, 0.4); } |
jQuery Code:
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 |
// - Noel Delgado | @pixelia_me   var nodes  = document.querySelectorAll('li'),     _nodes = [].slice.call(nodes, 0);  var getDirection = function (ev, obj) {     var w = obj.offsetWidth,         h = obj.offsetHeight,         x = (ev.pageX - obj.offsetLeft - (w / 2) * (w > h ? (h / w) : 1)),         y = (ev.pageY - obj.offsetTop - (h / 2) * (h > w ? (w / h) : 1)),         d = Math.round( Math.atan2(y, x) / 1.57079633 + 5 ) % 4;       return d; };  var addClass = function ( ev, obj, state ) {     var direction = getDirection( ev, obj ),         class_suffix = "";         obj.className = "";         switch ( direction ) {         case 0 : class_suffix = '-top';    break;         case 1 : class_suffix = '-right';  break;         case 2 : class_suffix = '-bottom'; break;         case 3 : class_suffix = '-left';  break;     }         obj.classList.add( state + class_suffix ); };  // bind events _nodes.forEach(function (el) {     el.addEventListener('mouseover', function (ev) {         addClass( ev, this, 'in' );     }, false);      el.addEventListener('mouseout', function (ev) {         addClass( ev, this, 'out' );     }, false); }); |