N
N
ne_pes2018-03-01 19:10:02
css
ne_pes, 2018-03-01 19:10:02

How to make a slider in a modal window?

there is a swiper.js slider, how to make the page background dim when the button is clicked and the slider appears on top of all windows?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DmitriySwan, 2018-03-01
@DmitriySwan

1) Make a slider, hide it and set the highest z-index;
2) Make a background for the slider that darkens the background, hide it too and set width: 100% height: 100%;
3) Hang an event on the button that shows these two blocks.
(You can simply switch the background class with the opacity and visibility:hidden properties, and drive the slider to top: -9999px, and then, as it were, set the desired height and it will fall from above, that is, the background will immediately form, and then the block will fall. Well, for that, and for that, put a transition)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question