首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >忽略每部智能手机上的CSS

忽略每部智能手机上的CSS
EN

Stack Overflow用户
提问于 2015-03-17 20:18:49
回答 1查看 39关注 0票数 0

我想忽略一个CSS从我的网站上的智能手机。

下面是我想忽略的CSS:

代码语言:javascript
复制
a[href="http://localhost/wordpress/ireland/"], a[href="http://localhost/wordpress/france/"], a[href="http://localhost/wordpress/spain/"], a[href="http://localhost/wordpress/portugal/"], a[href="http://localhost/wordpress/canary-islands/"], a[href="http://localhost/wordpress/africa/"], a[href="http://localhost/wordpress/central-america/"], a[href="http://localhost/wordpress/indonesia/"], a[href="http://localhost/wordpress/carribean/"]{
   pointer-events: none;
   cursor: default;
}

也许我必须使用这个:

代码语言:javascript
复制
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}

我真的不明白,谢谢你的帮助!

编辑:

代码语言:javascript
复制
@media (min-width: 600px){
    a[href="http://localhost/wordpress/ireland/"], a[href="http://localhost/wordpress/france/"], a[href="http://localhost/wordpress/spain/"], a[href="http://localhost/wordpress/portugal/"], a[href="http://localhost/wordpress/canary-islands/"], a[href="http://localhost/wordpress/africa/"], a[href="http://localhost/wordpress/central-america/"], a[href="http://localhost/wordpress/indonesia/"], a[href="http://localhost/wordpress/carribean/"]{
       pointer-events: auto;
       cursor: default;
        }
    }
EN

回答 1

Stack Overflow用户

发布于 2015-03-17 20:39:20

你差一点就成功了。

您只需要将css包装在media query中。

不确定你需要限制到什么宽度,但我认为大多数智能手机都小于600px,所以下面的方法应该适用于你。

代码语言:javascript
复制
@media (min-width: 600px){
    a[href="http://localhost/wordpress/ireland/"], a[href="http://localhost/wordpress/france/"], a[href="http://localhost/wordpress/spain/"], a[href="http://localhost/wordpress/portugal/"], a[href="http://localhost/wordpress/canary-islands/"], a[href="http://localhost/wordpress/africa/"], a[href="http://localhost/wordpress/central-america/"], a[href="http://localhost/wordpress/indonesia/"], a[href="http://localhost/wordpress/carribean/"]{
       pointer-events: none;
       cursor: default;
    }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29098892

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档