Position modal relative element background IONIC

Please describe the question in detail and share your code, configuration, and other relevant info.

It is possible to locate the modal relative to the elements that are in the background, for example if there is an element above that the modal appears above, if the element is in the middle the modal is positioned in the middle or in the place where the element is .

I tried to solve it through media queries but it is very limited to the device for iPhone the range of device is smaller but for android it is more complex, I need it to be exact and not vary according to the device

// IOS
@media screen and (max-height: 720px) {
  ::ng-deep .ios .modal-custom {
    top: -7.6 rem;

// APK
@media screen and (max-height: 720px) {
  ::ng-deep .md .modal-custom {
    top: -3 rem;

Image B

Aren’t you looking for a popover instead?

not what I’m looking for is a tour in the application, I’m doing it with a modal to deactivate the background, and position myself in the back icons