问题
Where can I find such a full list?
I can tell there are .js and .no-js , .touch and .no-touch.
But .opacity -- is there .no-opacity or just missing .opacity means no support? This is just an example. A full list helps me a lot in writing code for those devices that I don't have.
回答1:
All Modernizr detects will add .<feature>
if supported and .no-<feature>
if not. The set of detects depends on the custom build settings you chose in the downloader.
In the source of every Modernizr build, there's a URL in the comment at the top, which looks something like this:
Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-...
which lists all of the detects which have been included. So if fontface
is in this list, you know that Modernizr will either add .fontface
or .no-fontface
depending on the detection result.
来源:https://stackoverflow.com/questions/19173215/full-list-of-possible-classnames-added-by-modernizr