How to set media queries only for tablets and smartphones without reference to the resolution?

Good day!
Please tell me how to set media queries only for tablets and smartphones without being tied to the screen resolution?
On my website there is a parallax in the banner that I need to disable on all tablets/smartphones.
If I bind to solution - how to prevent parallax for phones and tablets with a resolution of 1920*1080?

If media, such napodobie?
@media (min-device-width: 800px) and (max-device-width: 1280px) {

Thank you!
June 10th 19 at 14:56
4 answers
June 10th 19 at 14:58
June 10th 19 at 15:00
Does not exist, unfortunately, in the media query mechanism to determine whether the mobile device is used or a desktop. It is possible only indirectly via the permissions screen to determine what kind of device is in front of you. Good selection for all occasions, for example here
June 10th 19 at 15:02
if( $detect->isMobile() ) {}
if( $detect->isTablet() ) {}
if( $detect->isMobile() && $detect->isTablet() ) {}
June 10th 19 at 15:04
th use? fullpage.ZHS? if so then there is properties responsive Hite and responsive WITZ to disable parallax. And why to ban cell phone with such a huge resolution? they will be able to display and scroll. So it makes sense to focus on the maximum width or height at which to cut off the parallax, when the content is already beginning to swim.

Find more questions by tags CSSSassJavaScript