html - 在所有智能手机上忽略 CSS

标签 html css responsive-design stylesheet pointer-events

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

这是我想忽略的 CSS:

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;
}

也许我必须使用这个:

@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}

我不是很明白,谢谢你的帮助!

编辑:

@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;
        }
    }

最佳答案

你几乎拥有它。

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

不确定您需要限制的宽度,但我认为大多数智能手机都小于 600 像素,因此以下内容应该适合您。

@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;
    }
}

关于html - 在所有智能手机上忽略 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29098892/

相关文章:

html - Bootstrap 响应式菜单不适用于我的模板

html - IE10 给我错误 1509,不匹配的结束标记

html - 如何相对于固定的导航和页脚移动主要内容

javascript - 如何使用 javascript 或 jquery 去除样式效果?

html - 制作响应式网站和标题图片无法正确响应

javascript - 使用 iframe 检测不活动状态

jquery - CSS/Jquery 在 Safari 和 IE 中的固定位置和神秘边距

jQuery addClass ('error' ) 到 "jQuery Validation Plugin v1.12"内的表单字段

jquery - CSS 中断词和动态 HTML

javascript - 滚动为电子表格