问题
I am writing a stylesheet to use with my Compiled Help files. It looks like CSS2 generally works, but I'm not sure about CSS selectors like >
and +
.
Is the CHM format equivalent to, say, IE 7? fwiw, I am authoring on Windows 7 and IE9 is installed.
回答1:
The HTML Help Viewer uses the layout engine components of Microsoft Internet Explorer (Shdocvw.dll hosting Mshtml.dll) to display Help topics.
http://msdn.microsoft.com/en-us/library/aa189109%28v=office.10%29.aspx
Which means: CSS version support is determined by which IE version is installed.
回答2:
On Windows Vista and later (I tested 7, 8, and 8.1), the HTML Help Viewer uses IE 7, even if you have a more recent version of Internet Explorer installed, and even if Windows itself comes bundled with a more recent version of Internet Explorer.
On Windows XP and prior, if the user has IE 7 or prior installed, then the HTML Help Viewer uses whichever version of IE the user has installed. If the user has IE 8 installed, then the HTML Help Viewer will use the IE 7 engine, even if the user never installed IE 7. IE 9 and later cannot be installed on Windows XP or prior.
So it seems HTML Help will be fovever stuck with IE 7.
Here's a small CHM file that you can use to test this: http://download.jgsoft.com/helpscribble/UserAgent.chm
(If the right hand pane of the HTML Help Viewer shows "navigation canceled" or a similar error, you need to right-click the downloaded CHM in Windows Explorer, select Properties, and then click the Unblock button.)
来源:https://stackoverflow.com/questions/11300887/which-css-versions-are-supported-in-chm-files