D
D
Dmitry2019-03-11 12:54:21
JavaScript
Dmitry, 2019-03-11 12:54:21

How to make the modal window fit the height of the content?

Good afternoon. I shoveled through the documentation for the Fancybox-3 plugin and thought I could handle it myself. The essence of the problem. The modal window contains text content and it can be larger than the height of the screen, for example, a mobile phone. And that's what is below the screen area is cropped. But I noticed: if you scroll and keep the clicked link at the same time, the content scrolls below without clipping. Help solve the problem. I call the content with this link:

<a href="#new-mod-tarifs-modal-1" data-fancybox class="services-item services-item--order">Some text</a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2019-03-11
@Kozack

https://codepen.io/fancyapps/pen/yxmrwG?editors=1100

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question