仅为 chrome/ff/ie 指定宽度
有没有一种方法可以在 CSS 中单独为 Chrome/Firefox/Internet Explorere 指定宽度,以便它只在其中一个浏览器中生效?
有人知道一些黑客吗?
Is there a way of spec a width in CSS individually for Chrome/Firefox/Internet Explorere so it only takes effect in one of those browsers?
Does anyone know some hacks?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用服务器端或客户端(例如javascript)代码来确定用户代理,并相应地采取不同的操作。
就像德米安在评论中问的那样:你想做什么?还有:你还尝试过什么?如果没有更多细节,很难提供帮助。
另请注意,人们通常不愿意回答此类问题,因为在许多情况下,更好的解决方案是适用于所有浏览器的解决方案。
You could use either server side or client side (e.g. javascript) code to determine the user agent, and act different accordingly.
Like Demian asked in a comment: what are you trying to do? And: what have you tried yet? Without further details it's hard to help out.
Also note people will typically be reluctant to answer this type of question, as in many cases the better solution is the one that works in all browsers.