css只适用于台式机或笔记本电脑,但不适用于ipad浏览器 [英] css only for desktop or laptops but not for ipad browsers

查看:93
本文介绍了css只适用于台式机或笔记本电脑,但不适用于ipad浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将css仅应用于不包括ipad和移动浏览器的台式机和笔记本电脑浏览器?

  (min-width:742px)和(max-width:769px){
#element {
display:none;
}
}


解决方案

,我得到工作媒体查询只为桌面或笔记本电脑浏览器:

  @media只有屏幕和(最小宽度:742像素) (max-width:769px),
不全部和(min-width:742px)和(max-width:769px)(orientation-portrait){
#element {
display:none ;很高兴地说,它工作不错。 p>

How can I apply the css only for desktops and laptops browser excluding ipad and mobile browsers?

@media only screen and (min-width: 742px) and (max-width: 769px){
  #element{
    display: none;
  }
}

解决方案

Finally, I got working media query only for desktops or laptops browser:

@media only screen and (min-width: 742px) and (max-width: 769px), 
not all and (min-width: 742px) and (max-width: 769px) (orientation: portrait){
   #element{
     display: none;
  }
}

Glad to say, it is working nice.

这篇关于css只适用于台式机或笔记本电脑,但不适用于ipad浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆