Builtgrowth commited on
Commit
d8e447f
·
verified ·
1 Parent(s): 63fb381

dont skew the boxes

Browse files
Files changed (1) hide show
  1. index.html +3 -23
index.html CHANGED
@@ -37,24 +37,9 @@
37
  background-image: url('http://static.photos/blue/640x360/6');
38
  }
39
  .bento-box:hover {
40
- transform: scale(1.05) rotate3d(1, 1, 0, 15deg);
41
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
42
  }
43
- .bento-box:nth-child(2):hover {
44
- transform: scale(1.05) rotate3d(-1, 1, 0, 15deg);
45
- }
46
- .bento-box:nth-child(3):hover {
47
- transform: scale(1.05) rotate3d(0, 1, 1, 15deg);
48
- }
49
- .bento-box:nth-child(4):hover {
50
- transform: scale(1.05) rotate3d(1, 0, 1, 15deg);
51
- }
52
- .bento-box:nth-child(5):hover {
53
- transform: scale(1.05) rotate3d(1, -1, 0, 15deg);
54
- }
55
- .bento-box:nth-child(6):hover {
56
- transform: scale(1.05) rotate3d(0, -1, 1, 15deg);
57
- }
58
  </style>
59
  </head>
60
  <body class="bg-gradient-to-br from-indigo-50 to-purple-50 min-h-screen">
@@ -161,13 +146,10 @@
161
  anime({
162
  targets: this,
163
  scale: [1, 1.05],
164
- rotateX: index % 2 === 0 ? [0, 15] : [0, -15],
165
- rotateY: index % 3 === 0 ? [0, 15] : [0, -15],
166
  duration: 500,
167
  easing: 'spring(1, 80, 10, 0)'
168
  });
169
-
170
- anime({
171
  targets: this.querySelectorAll('*'),
172
  translateY: [-10, 0],
173
  opacity: [0, 1],
@@ -181,12 +163,10 @@
181
  anime({
182
  targets: this,
183
  scale: 1,
184
- rotateX: 0,
185
- rotateY: 0,
186
  duration: 600,
187
  easing: 'easeOutElastic(1, .5)'
188
  });
189
- });
190
  });
191
  // Cursor follower effect
192
  document.addEventListener('mousemove', function(e) {
 
37
  background-image: url('http://static.photos/blue/640x360/6');
38
  }
39
  .bento-box:hover {
40
+ transform: scale(1.05);
41
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
42
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  </style>
44
  </head>
45
  <body class="bg-gradient-to-br from-indigo-50 to-purple-50 min-h-screen">
 
146
  anime({
147
  targets: this,
148
  scale: [1, 1.05],
 
 
149
  duration: 500,
150
  easing: 'spring(1, 80, 10, 0)'
151
  });
152
+ anime({
 
153
  targets: this.querySelectorAll('*'),
154
  translateY: [-10, 0],
155
  opacity: [0, 1],
 
163
  anime({
164
  targets: this,
165
  scale: 1,
 
 
166
  duration: 600,
167
  easing: 'easeOutElastic(1, .5)'
168
  });
169
+ });
170
  });
171
  // Cursor follower effect
172
  document.addEventListener('mousemove', function(e) {