jQueryでiPhone/iPadの向きを検出する iPhone/iPadで向きの概念が存在し、横向き(landscape)と縦向き(portrait)によって幅が変わるのでデザインやスクリプトを変更することがあります。 そういった場合に利用できるのがメディアクエリーのorientationです。 <link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css"> <link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css"> このように記述をすると縦向き(portrait)の場合はportrait.cssを横向き(landscape)の場合はlandscape.cssを読み込むことが出
![jQueryでiPhone/iPadの向きを検出する[to-R]](https://images.weserv.nl/?url=https%3A%2F%2Fcdn-ak-scissors.b.st-hatena.com%2Fimage%2Fsquare%2F1788fe5c4e0abeec501baa392c032db6a3514abe%2Fheight%3D288%3Bversion%3D1%3Bwidth%3D512%2Fhttp%253A%252F%252Fblog.webcreativepark.net%252Fimages%252F20100817_01.jpg&q=12&output=webp&max-age=110)