Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以编写浏览器特定的(有条件的)JS 代码,例如 CSS?如果可能的话,我正在寻找一些参考资料。
既然你的问题很模糊,那么我的答案只能是。在绝大多数情况下,使用用户代理检测是完全没有必要的,而且经常会给你错误的结果。您最好考虑功能而不是浏览器,并在运行时检查功能支持。