gpt4 book ai didi

css - 为什么页面在 IE8 和 chm 中显示不同(CSS "display: inline-block"问题)

转载 作者:技术小花猫 更新时间:2023-10-29 11:40:41 26 4
gpt4 key购买 nike

在带有 IE8 的 Windows 7 上,我发现 display: inline-block 工作得很好。但是,我把html文件编译成chm后,chm里面的页面显示不好,好像inline-block没有生效。

有没有办法让chm显示和IE8一样?谢谢。

enter image description here

我的 html 源是:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>title to fill</title>
<meta charset="utf-8">
<style type="text/css">
#topcanvas {
z-index: 0;
top: 0;
left:0;
width:100%;
}

#chjnavi {
font-size: 10pt;
background-color: #eee;

padding: 0em 1em;
list-style-type: none;
position: relative;
z-index: 0;
}

#chjnavi ul {
margin: 0;
padding: 0;
}

#chjnavi li {
margin: 0;
padding: 8px;
display: inline-block;
/* !!! */

cursor: pointer;
}

</style>
</head>

<div id="topcanvas">
<div id="chjnavi">
<ul id="navibar_topul">
<li id="gentoc-t">item 1</li>
<li id="codecolor-t">item 2</li>
<li id="linenum-t">item 3</li>
</ul>
</div>
</div>
<p> My text. </p>
</body>
</html>

最佳答案

我终于找到了答案。 A post at west-wind.com告诉我我需要做一个注册表 hack 让 CHM 阅读器 (hh.exe) 使用 IE8 渲染模式,否则,hh.exe 最多使用 IE7。

注册表hack是:将以下代码保存到.reg文件,然后双击导入到注册表。

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
"hh.exe"=dword:00001f40

好的。至少IE8 M$系统有解决办法。

这个问题与Will the IE9 WebBrowser Control Support all of IE9's features, including SVG?有关

关于css - 为什么页面在 IE8 和 chm 中显示不同(CSS "display: inline-block"问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17042914/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com