Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了确定我正在使用的屏幕尺寸,media queries但我想确定是否有设备,portrait or landscape mode using CSS以便我可以根据屏幕尺寸拥有不同的背景图像。
media queries
portrait or landscape mode using CSS
有什么想法吗?
只需为横向和纵向模式编写媒体查询:
/* Portrait */ @media screen and (orientation:portrait) { /* Portrait styles */ } /* Landscape */ @media screen and (orientation:landscape) { /* Landscape styles */ }
链接在这里