1
我正在寻找选择菜单的防弹工作流程。我有有条件的意见为即10+将Firefox CSS版的名称添加到HTML标签中的版本小于35
<!--[if lt IE 7]> <html class="ie ie6 lte9 lte8 lte7"> <![endif]-->
<!--[if IE 7]> <html class="ie ie7 lte9 lte8 lte7"> <![endif]-->
<!--[if IE 8]> <html class="ie ie8 lte9 lte8"> <![endif]-->
<!--[if IE 9]> <html class="ie ie9 lte9"> <![endif]-->
<!--[if gt IE 9]> <html class="gt9"> <![endif]-->
<!--[if !IE]><!--> <html> <!--<![endif]-->
和铬的方法就很好,当谈到隐藏/显示与选择箭头:
-webkit-appearance: none;
然而,当涉及到Firefox:
-moz-appearance:none;
适用于版本35+。这意味着FF将在选择菜单上显示我的自定义背景图像箭头及其默认值。因此隐藏这些传统浏览器的下拉箭头是跨浏览器解决方案的最后障碍。
如何针对35版以前的Firefox浏览器定位背景图片? 我知道modernizer或其他库可能可以这样做,但这太过分了,以便将类名添加到< html>或我不知道的供应商特定伪元素。提前致谢。
您需要使用JavaScript的话.. – 2015-01-15 17:08:19
你并不需要使用一个lib像近代化,你可以只写JS的几行代码来检查FF版本。 http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser你并不需要所有它,因为你只需要检查FF – Huangism 2015-01-15 17:10:33
你可以创建一个定制构建Modernizer以测试特定的一组功能,并不一定是整个色域:http://stackoverflow.com/questions/13615963/detecting-for-webkit-apperance-with-modernizr#answer-17742395 – hungerstar 2015-01-15 17:33:57