Responsive CSS - Target 1024 x 768 Screen Size Only

纵然是瞬间 提交于 2020-01-01 05:34:09

问题


I have built a responsive site, Works fine on all screen sizes barring the 1024 x 768 (Tablet Landscape)

I am looking for specific CSS (or am open for JS) to target a 1024 x 768 screen.


回答1:


Use for desktop:

@media (min-width:769px) and (max-width:1024px){
    // your code
}

Use for tablet:

@media (min-device-width:769px) and (max-device-width:1024px){
    // your code
}



回答2:


You can use media Query Like this

@media (min-width:769px) and (max-width:1024px) {
    //css stuffs here
}

This is the Way if you want Tablet landscape



来源:https://stackoverflow.com/questions/21162094/responsive-css-target-1024-x-768-screen-size-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!