手機端橫屏**查詢
@media (max-width: 767px) and (orientation: landscape ){}
裝置查詢相容手持裝置
橫屏:@media only screen and (min-device-width: 600px) and (max-device-width: 1024px) and (orientation : landscape) {},
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : landscape) {},
@media only screen and (min-device-width: 384px) and (max-device-width: 640px) and (orientation : landscape) {},
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : landscape) {},
@media only screen and (min-device-width: 360px) and (max-device-width: 640px) and (orientation : landscape) {},
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation : landscape) {},
@media only screen and (min-device-width: 320px) and (max-device-width: 533px) and (orientation : landscape){},
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation : landscape) {}。
使用了google瀏覽器的裝置模擬器,很好用的,新的版本還支援查詢螢幕的狀態,橫屏,豎屏。
兩個都是依次減小的。
豎屏:然後豎屏的居然是這樣的:
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation : portrait) {},
@media only screen and (min-device-width: 360px) and (max-device-width: 640px) and (orientation : portrait) {},
@media only screen and (min-device-width: 360px) and (max-device-width: 567px) and (orientation : portrait) {},
@media only screen and (min-device-width: 384px) and (max-device-width: 640px) and (orientation : portrait) {},
@media only screen and (min-device-width: 412px) and (max-device-width: 659px) and (orientation : portrait) {},
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : portrait) {},
@media only screen and (min-device-width: 600px) and (max-device-width: 960px) and (orientation : portrait) {},
@media only screen and (min-device-width: 600px) and (max-device-width: 1024px) and (orientation : portrait) {}。
兩個都是增大的。
調了好久,好吧!!!
然後豎屏這樣的才對tt
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation : portrait) {}
@media only screen and (min-device-width: 320px) and (max-device-width: 533px) and (orientation : portrait) {}
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (orientation : portrait) {}
@media only screen and (min-device-width: 360px) and (max-device-width: 567px) and (orientation : portrait) {}
@media only screen and (min-device-width: 360px) and (max-device-width: 640px) and (orientation : portrait)
@media only screen and (min-device-width: 384px) and (max-device-width: 640px) and (orientation : portrait)
@media only screen and (min-device-width: 412px) and (max-device-width: 659px) and (orientation : portrait) {}
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : portrait) {}
@media only screen and (min-device-width: 600px) and (max-device-width: 960px) and (orientation : portrait) {}
@media only screen and (min-device-width: 600px) and (max-device-width: 1024px) and (orientation : portrait) {}
龍芯軟體開發(31) PCI裝置查詢細節
這段時間,又在對龍芯盒子的pci的匯流排進行程式設計。目前有了一點點進展,發現pci匯流排也是很複雜的東西。由於所有其它外設都是掛在pci匯流排上,如果要對外設進行程式設計,就得對pci比較了解,並且可以對它程式設計。pci匯流排是一條平等的匯流排,所有裝置都是平等的。在某一時刻會有乙個裝置是主裝置...
CSS 適配裝置
375 x 667 iphone 6 media screen and max width 375px and min width 320px 寬度小於500px時用以下樣式覆蓋原樣式以達到適配手機 414 x 736 iphone 6p media screen and max width 500...
QML適配不同裝置
做嵌入式和移動開發,不同的裝置,不同的解析度需要ui能夠適配,這是乙個很現實的問題。qml作為qt中為ui而生的,使用qml一定要解決適配的問題。現在同一尺寸的螢幕,其解析度也是不同,在qml中使用 anchors 進行相對的布局時,其是以畫素為單位。現在有乙個概念,叫做每英吋畫素數目。當裝置的pp...