0

I need to have some stack of divs that are on top of each other. The number of blocks is defined by the length of a given array that is in my component,which is dynamic. For example if the array is sized 2 the result will be: enter image description here

If the size of the array is 3 the result will be enter image description here

I understand that I need to loop through the number of blocks I want and transform: translate(-50% *(i), -50% * i) where i is the index of the for that starts with 1. how I can achive this using scss/ css only ? How do I pass the variable in order to loop through it? Or there is another way that can be done ?

In my component I have an array , it can change it's size. The number of blocks has to be as the size of this array. Thanks

MD10
  • 1,313
  • 3
  • 12
  • 35

0 Answers0