Device orientation check in your website using CSS or Javascript code

preview_player
Показать описание

Join the Late Night Coders community to get access to online courses and more:

In this video, I am using my Webpack boilerplate code as the starting point. You can check the video below to learn more:

Video Chapters:
00:00 Intro
00:46 Starter code and setup
03:48 Device orientation check using (S)CSS
07:40 Check the CSS code on a physical mobile device
09:50 Check device orientation using JavaScript (Doesn't work on Safari on iOS)
16:40 Check device orientation using JavaScript (Works on Safari on iOS too)
20:04 Live example on my portfolio and Outro

Github repository for the starter code:

Github repository for the finished project of this video:

✅ 🆓 Please make sure to subscribe to the channel and hit the notification bell to be the first to know whenever I upload new videos.⚠️

Useful links:

Finally, leave a comment below and let me know if you have any questions or you have any topics in mind that would like me to make videos for.

Happy coding 🙂
Рекомендации по теме