我想在智能手机上忽略我网站上的一个 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/