K
K
Koreetz Koreetz2018-10-26 17:29:28
css
Koreetz Koreetz, 2018-10-26 17:29:28

Find every second(third) element in Angular?

Good afternoon everyone!
I display cards on the main page through *ngIfeverything is fine, but I need to make an adaptive and here is the most interesting thing. when you click on the card, a modal appears (it is attached to the card, set top: 0 left: 0), but when I reduce the screen, the modal goes beyond the view screen and a scroll appears! is it possible for me to define every second third and so on element through css?
tried to use :nth-child(2n)does not work. 5bd3247a81738156421003.jpeg
It is necessary that if not a small screen, a window does not appear on the top left and top right!
I so suspect only through js to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey P, 2018-10-28
@lynxp9

Have you tried https://github.com/angular/flex-layout ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question