检测何时禁用样式 [英] Detecting when styles disabled

查看:99
本文介绍了检测何时禁用样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果用户已禁用您的样式表,使用JS检测的最佳方法是什么?是否有可靠的方法吗?

What's the best way to detect, with JS, if the user has disabled your stylesheets? Is there a reliable way even?

推荐答案

很容易就是检查主体背景颜色。

Something easy would be to check the body background color for instance.

但是,有人禁用CSS而不是Javascript的可能性有多大? (dunno你明显使用它)

However, how likely is it someone disables CSS and not Javascript? (dunno what you use it for obviously)

这篇关于检测何时禁用样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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