是否可以使用纯CSS检测Firefox用户? [英] Is it possible to detect Firefox users in pure CSS?
本文介绍了是否可以使用纯CSS检测Firefox用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以仅使用IE之类的CSS来检测Firefox浏览器?
Is it possible to detect Firefox Browser only with CSS like IE?
例如,可以使用以下方式检测IE浏览器:
for example, IE browser can be detected like:
<!--[if IE 7]>
/* IMPORTING CSS FOR IE */
<![endif]-->
可以像这样的代码检测到Firefox浏览器吗?
Can be Firefox browser detected like this code?
推荐答案
我不知道,但是您可以尝试以下方法:
Not that I know of, but you can try this:
@-moz-document url-prefix() {
#my-id { font-size: 100%; }
}
此网站也有更多选择
您可以将其放置在CSS文件中或HTML的< style type ='text / css'>
标记之间。效果很好!
You can place this in your CSS file or between your <style type='text/css'>
tags in your HTML. Works Fine!
这篇关于是否可以使用纯CSS检测Firefox用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文