File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ svg {
1313}
1414
1515.cell : hover , .cell : visited , .cell : focus {
16- /* animation: loaderAnim 5s ease-in-out infinite normal forwards; */
16+ animation : spinFlowers 5s ease-in-out infinite normal forwards;
1717 padding : 0 ;
1818 margin : 0 ;
1919}
2020
2121
22- /* @keyframes loaderAnim {
22+ @keyframes spinFlowers {
2323 0% {
2424 transform : rotate (0deg );
2525 }
2929 100% {
3030 transform : rotate (0deg );
3131 }
32- } */
32+ }
3333
3434/* @media only screen and (max-width: 600px) {
3535 .row:nth-child(2n) {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ function setup() {
2828 makeGrid ( rows , cols ) ;
2929 shapes = makeFlowers ( radius ) ;
3030 addSvgsToCells ( size , padding ) ;
31+ offsetEvenRows ( size + padding ) ;
3132 // fixCellPosiiton();
3233 // addOnClickToCells();
3334}
@@ -80,6 +81,15 @@ function addOnClickToCells() {
8081 } ) ;
8182}
8283
84+ function offsetEvenRows ( size ) {
85+ $ ( ".row" ) . each ( function ( index , object ) {
86+ if ( index % 2 ) {
87+ $ ( object ) . css ( "position" , "relative" ) ;
88+ $ ( object ) . css ( "left" , size / 2 * - 1 + "px" ) ;
89+ }
90+ } ) ;
91+ }
92+
8393function makeGrid ( rows , cols ) {
8494 $ ( 'body' ) . empty ( ) ;
8595 for ( var r = 0 ; r < rows ; r ++ ) {
Original file line number Diff line number Diff line change 88 </ head >
99 < body >
1010 </ body >
11- < script src ="./js/secrets .js "> </ script >
11+ < script src ="./js/2secrets .js "> </ script >
1212</ html >
You can’t perform that action at this time.
0 commit comments