{"id":1572,"date":"2011-05-16T20:17:00","date_gmt":"2011-05-16T12:17:00","guid":{"rendered":""},"modified":"2011-05-16T20:17:00","modified_gmt":"2011-05-16T12:17:00","slug":"","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/1572.html","title":{"rendered":"IE6\u3001IE7\u3001IE8 CSS Bug\u517c\u5bb9\u89e3\u51b3\u8bb0\u5f55"},"content":{"rendered":"<p><html><head><meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><title>IE6\u3001IE7\u3001IE8 CSS Bug\u517c\u5bb9\u89e3\u51b3\u8bb0\u5f55<\/title><\/head><body><\/p>\n<h1 style=\"display:none\">IE6\u3001IE7\u3001IE8 CSS Bug\u517c\u5bb9\u89e3\u51b3\u8bb0\u5f55<\/h1>\n<div>\n<p><span style=\"color:#ff0000\">1\uff1ali\u8fb9\u8ddd\u201c\u65e0\u6545\u201d\u589e\u52a0<\/span><\/p>\n<p>\u4efb\u4f55\u4e8b\u60c5\u90fd\u662f\u6709\u539f\u56e0\u7684\uff0cli\u8fb9\u8ddd\u4e5f\u4e0d\u4f8b\u5916\u3002<\/p>\n<p>\u5148\u63cf\u8ff0\u4e00\u4e0b\u5177\u4f53\u72b6\u51b5\uff1a\u6709\u4e9b\u65f6\u5019li\u8fb9\u8ddd\u4f1a\u7a81\u7136\u589e \u52a0\u5f88\u591a\uff0c\u503c\u4e5f\u4e0d\u56fa\u5b9a\uff08\u53ea\u5728IE6\/IE7\u6709\u8fd9\u79cd\u73b0\u8c61\uff09\uff0c\u8ba9\u4eba\u6478\u4e0d\u7740\u5934\u8111\uff0c\u4ed4\u7ec6\u201c\u7814\u7a76\u201d\u53d1\u73b0\u662f\u7531\u4e8e\u5176\u4f4e\u7ea7\u5143\u7d20ul\u7684padding\u5f15 \u8d77\uff0cpadding\u7684\u4e0a\u4e0b\u503c\u5bf9li\u6709\u5f71\u54cd\uff0c\u5de6\u53f3\u65e0\u5f71 \u54cd\u3002\u6240\u4ee5\u53ea\u597d\u7b28\u624b\u7b28\u811a\u5730\u628apadding\u53bb\u6389\uff0c\u6362\u6210margin\u3002\u8fd9\u662f\u80fd\u89e3\u51b3\u95ee\u9898\uff0c\u4f46\u5f80\u5f80\u4e0d\u662f\u6211\u4eec\u60f3\u8981\u7684\u7ed3\u679c\uff0c\u6216\u8bb8 \u8fd8\u4f1a\u5f15\u8d77\u5176\u4ed6\u4e0d\u5fc5\u8981\u7684\u602a\u73b0\u8c61\u3002<\/p>\n<p>\u73b0\u5728\u7ec8\u4e8e\u53d1\u73b0\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u7684\u65b9\u6cd5\uff0c\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u65e2\u7136\u662f\u6709ul\u5f15 \u8d77\u7684\uff0c\u5c31\u8bbe\u7f6eul\u7684\u663e\u793a\u5f62\u5f0f\u4e3a*display:inline-block;\u5373\u53ef\uff0c\u524d\u9762\u52a0*\u662f\u53ea \u9488\u5bf9IE6\/IE7\u6709\u6548\uff0c\u5176\u4ed6\u6d4f\u89c8\u5668\u5e76\u4e0d\u6e32\u67d3\u8fd9\u4e2a\u5c5e\u6027\u3002<\/p>\n<p><span style=\"color:#ff0000\">2\uff1a\u5206\u9875\u6570\u5b57 \u5b57\u4f53\u7528\u201cArial \u201d\u52a0\u7c97\u4e0d\u6296\u52a8<\/span><\/p>\n<p>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; &#8220;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;<\/p>\n<p>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>&lt;meta http-equiv=&#8221;Content-Type&#8221;content=&#8221;text\/html; charset=gb2312&#8243;\/&gt;<\/p>\n<p>&lt;title&gt;\u65e0\u6807\u9898\u6587\u6863&lt;\/title&gt;<\/p>\n<p>&lt;link href=&#8221;css\/style.css&#8221;rel=&#8221;stylesheet&#8221;type=&#8221;text\/css&#8221;\/&gt;<\/p>\n<p>&lt;style type=&#8221;text\/css&#8221;&gt;<\/p>\n<p>body, ul, h1 {<\/p>\n<p>font-family:Arial;<\/p>\n<p>font-size:12px;<\/p>\n<p>}<\/p>\n<p>.page {<\/p>\n<p>text-align:center;<\/p>\n<p>}<\/p>\n<p>.page a {<\/p>\n<p>display:inline-block;<\/p>\n<p>padding:5px 8px;<\/p>\n<p>text-decoration:none;<\/p>\n<p>border:1px solid #09F;<\/p>\n<p>background-color:#0CF;<\/p>\n<p>color:#FFF;<\/p>\n<p>}<\/p>\n<p>.page a:hover, .page .selected {<\/p>\n<p>border:1px solid #CCC;<\/p>\n<p>background-color:#FFF;<\/p>\n<p>color:#000;<\/p>\n<p>font-weight:bold;<\/p>\n<p>}<\/p>\n<p>&lt;\/style&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;h1&gt;\u5206\u9875\u6837\u5f0f&lt;\/h1&gt;<\/p>\n<p>&lt;div class=&#8221;page&#8221;&gt; &lt;a href=&#8221;#&#8221;&gt;1&lt;\/a&gt; &lt;a href=&#8221;#&#8221;class=&#8221;selected&#8221;&gt;2&lt;\/a&gt; &lt;a href=&#8221;#&#8221;&gt;3&lt;\/a&gt; &lt;a href=&#8221;#&#8221;&gt;4&lt;\/a&gt; &lt;a href=&#8221;#&#8221;&gt;5&lt;\/a&gt;<\/p>\n<p>&lt;a href=&#8221;#&#8221;&gt;6&lt;\/a&gt; &lt;a href=&#8221;#&#8221;&gt;7&lt;\/a&gt; &lt;a href=&#8221;#&#8221;&gt;8&lt;\/a&gt; &lt;a href=&#8221;#&#8221;&gt;9&lt;\/a&gt; &lt;a href=&#8221;#&#8221;&gt;10&lt;\/a&gt; &lt;\/div&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><span style=\"color:#ff0000\">3\uff1aIE6 CSS\u9009\u62e9\u5668\u533a\u5206IE6<\/span><\/p>\n<p>IE6\u4e0d\u652f\u6301\u5b50\u9009\u62e9\u5668\uff1b\u5148\u9488\u5bf9IE6\u4f7f\u7528\u5e38\u89c4\u7533\u660eCSS\u9009\u62e9\u5668\uff0c\u7136\u540e\u518d\u7528\u5b50\u9009\u62e9\u5668\u9488\u5bf9IE7+\u53ca\u5176\u4ed6\u6d4f\u89c8\u5668\u3002<\/p>\n<p>\/*IE6 \u4e13\u7528 *\/<\/p>\n<p>.content {color:red;}<\/p>\n<p>\/* \u5176\u4ed6\u6d4f\u89c8\u5668 *\/<\/p>\n<p>div&gt;p .content {color:blue;}<\/p>\n<p><span style=\"color:#ff0000\">4\uff1aIE6\u6700\u5c0f\u9ad8\u5ea6<\/span><\/p>\n<p>IE6 \u4e0d\u652f\u6301min-height\u5c5e\u6027\uff0c\u4f46\u5b83\u5374\u8ba4\u4e3aheight\u5c31\u662f\u6700\u5c0f\u9ad8\u5ea6\u3002\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<p>\u4f7f\u7528ie6\u4e0d\u652f\u6301\u4f46\u5176\u4f59\u6d4f\u89c8\u5668\u652f\u6301\u7684\u5c5e\u6027!important\u3002<\/p>\n<p>#container{min-height:200px; height:auto !important; height:200px;}<\/p>\n<p><span style=\"color: rgb(255, 0, 0); \">5\uff1aIE6100% \u9ad8\u5ea6<\/span><\/p>\n<p>\u5728IE6\u4e0b\uff0c\u5982\u679c\u8981\u7ed9\u5143\u7d20\u5b9a\u4e49100%\u9ad8\u5ea6\uff0c\u5fc5\u987b\u8981\u660e\u786e\u5b9a\u4e49\u5b83\u7684\u7236\u7ea7\u5143\u7d20\u7684\u9ad8\u5ea6\uff0c\u5982\u679c\u4f60\u9700\u8981\u7ed9\u5143\u7d20\u5b9a\u4e49\u6ee1\u5c4f\u7684\u9ad8\u5ea6\uff0c\u5c31\u5f97<\/p>\n<p>\u5148\u7ed9html\u548cbody\u5b9a\u4e49height:100%;\u3002<\/p>\n<p><span style=\"color:#ff0000\">6\uff1aIE6\u8eb2\u732b\u732bbug<\/span><\/p>\n<p>\u5728IE6\u548cIE7\u4e0b\uff0c\u8eb2\u732b\u732bbug\u662f\u4e00\u4e2a\u975e\u5e38\u607c\u4eba\u7684\u95ee\u9898\u3002\u4e00\u4e2a\u6491\u7834\u4e86\u5bb9\u5668\u7684\u6d6e\u52a8\u5143\u7d20\uff0c\u5982\u679c\u5728\u4ed6\u4e4b\u540e\u6709\u4e0d\u6d6e\u52a8\u7684\u5185\u5bb9\uff0c\u5e76\u4e14\u6709\u4e00<\/p>\n<p>\u4e9b\u5b9a\u4e49\u4e86:hover\u7684\u94fe\u63a5\uff0c\u5f53\u9f20\u6807\u79fb\u5230\u90a3\u4e9b\u94fe\u63a5\u4e0a\u65f6\uff0c\u5728IE6\u4e0b\u5c31\u4f1a\u89e6\u53d1\u8eb2\u732b\u732b\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\u5f88\u7b80\u5355\uff1a<\/p>\n<p>1.\u5728\uff08\u90a3\u4e2a\u672a\u6d6e\u52a8\u7684\uff09\u5185\u5bb9\u4e4b\u540e\u6dfb\u52a0\u4e00\u4e2a&lt;span style=&#8221;clear: both;&#8221;&gt; &lt;\/span&gt;<\/p>\n<p>2.\u89e6\u53d1\u5305\u542b\u4e86\u8fd9\u4e9b\u94fe\u63a5\u7684\u5bb9\u5668\u7684hasLayout\uff0c\u4e00\u4e2a\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\u7ed9\u5176\u5b9a\u4e49height:1%;<\/p>\n<p><span style=\"color:#ff0000\">7:IE6\u7edd\u5bf9\u5b9a\u4f4d\u5143\u7d20\u76841\u50cf\u7d20\u95f4\u8dddbug<\/span><\/p>\n<p>IE6\u4e0b\u7684\u8fd9\u4e2a\u9519\u8bef\u662f\u7531\u4e8e\u8fdb\u4f4d\u5904\u7406\u8bef\u5dee\u9020\u6210\uff08IE7\u5df2\u4fee\u590d\uff09\uff0c\u5f53\u7edd\u5bf9\u5b9a\u4f4d\u5143\u7d20\u7684\u7236\u5143\u7d20\u9ad8\u6216\u5bbd\u4e3a\u5947\u6570\u65f6\uff0cbottom\u548cright\u4f1a<\/p>\n<p>\u4ea7\u751f\u9519\u8bef\u3002\u552f\u4e00\u7684\u89e3\u51b3\u529e\u6cd5\u5c31\u662f\u7ed9\u7236\u5143\u7d20\u5b9a\u4e49\u660e\u786e\u7684\u9ad8\u5bbd\u503c\uff0c\u4f46\u5bf9\u4e8e\u6db2\u6001\u5e03\u5c40\u6ca1\u6709\u5b8c\u7f8e\u7684\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<p><span style=\"color:#ff0000\">8: IE\u4e0bz-index\u7684bug<\/span><\/p>\n<p>\u5728IE\u6d4f\u89c8\u5668\u4e2d\uff0c\u5b9a\u4f4d\u5143\u7d20\u7684z-index\u5c42\u7ea7\u662f\u76f8\u5bf9\u4e8e\u5404\u81ea\u7684\u7236\u7ea7\u5bb9\u5668\uff0c\u6240\u4ee5\u4f1a\u5bfc\u81f4z-index\u51fa\u73b0\u9519\u8bef\u7684\u8868\u73b0\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u7ed9<\/p>\n<p>\u5176\u7236\u7ea7\u5143\u7d20\u5b9a\u4e49z-index\uff0c\u6709\u4e9b\u60c5\u51b5\u4e0b\u8fd8\u9700\u8981\u5b9a\u4e49position:relative\u3002<\/p>\n<p><span style=\"color:#ff0000\">9: Overflow Bug<\/span><\/p>\n<p>\u5728IE6\/7\u4e2d\uff0coverflow\u65e0\u6cd5\u6b63\u786e\u7684\u9690\u85cf\u6709\u76f8\u5bf9\u5b9a\u4f4dposition:relative;\u7684\u5b50\u5143\u7d20\u3002\u89e3\u51b3\u65b9\u6cd5\u5c31\u662f\u7ed9\u5916\u5305\u5bb9\u5668.wrap\u52a0\u4e0a<\/p>\n<p>position:relative;\u3002<\/p>\n<p><span style=\"color:#ff0000\">10: \u6a2a\u5411\u5217\u8868\u5bbd\u5ea6bug<\/span><\/p>\n<p>\u5982\u679c\u4f60\u4f7f\u7528float:left;\u628a&lt;li&gt;\u6a2a\u5411\u6446\u5217\uff0c\u5e76\u4e14&lt;li&gt;\u5185\u5305\u542b\u7684&lt;a&gt;\uff08\u6216\u5176\u4ed6\uff09\u89e6\u53d1\u4e86 hasLayout\uff0c\u5728IE6\u4e0b\u5c31\u4f1a\u6709\u9519\u8bef\u7684<\/p>\n<p>\u8868\u73b0\u3002\u89e3\u51b3\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u7ed9&lt;a&gt;\u5b9a\u4e49\u540c\u6837\u7684float:left;\u5373\u53ef\u3002<\/p>\n<p><span style=\"color:#ff0000\">11: \u5217\u8868\u9636\u68afbug<\/span><\/p>\n<p>\u5217\u8868\u9636\u68afbug\u901a\u5e38\u4f1a\u5728\u7ed9&lt;li&gt;\u7684\u5b50\u5143\u7d20&lt;a&gt;\u4f7f\u7528float:left;\u65f6\u89e6\u53d1\uff0c\u6211\u4eec\u672c\u610f\u662f\u8981\u505a\u4e00\u4e2a\u6a2a\u5411\u7684\u5217\u8868(\u901a\u5e38 \u662f\u5bfc\u822a\u680f)\uff0c<\/p>\n<p>\u4f46IE\u5374\u53ef\u80fd\u5448\u73b0\u51fa\u5782\u76f4\u7684\u6216\u8005\u9636\u68af\u72b6\u3002\u89e3\u51b3\u529e\u6cd5\u5c31\u662f\u7ed9&lt;li&gt;\u5b9a\u4e49float:left;\u800c\u975e\u5b50\u5143\u7d20&lt;a&gt;\uff0c\u6216\u8005 \u7ed9&lt;li&gt;\u5b9a\u4e49<\/p>\n<p>display:inline;\u4e5f\u53ef\u4ee5\u89e3\u51b3\u3002<\/p>\n<p><span style=\"color:#ff0000\">12: \u5782\u76f4\u5217\u8868\u95f4\u9699bug<\/span><\/p>\n<p>\u5f53\u6211\u4eec\u4f7f\u7528&lt;li&gt; \u5305\u542b\u4e00\u4e2a\u5757\u7ea7\u5b50\u5143\u7d20\u65f6\uff0cIE6(IE7\u4e5f\u6709\u53ef\u80fd)\u4f1a\u9519\u8bef\u5730\u7ed9\u6bcf\u6761\u5217\u8868\u5143\u7d20\uff08&lt;li&gt;\uff09\u4e4b\u95f4\u6dfb\u52a0\u7a7a\u9699\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a\u628a&lt;a&gt;flaot\u5e76\u4e14\u6e05\u9664float\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff1b\u53e6\u5916\u4e00\u4e2a\u529e\u6cd5\u5c31\u662f\u89e6\u53d1&lt;a&gt;\u7684hasLayout\uff08\u5982\u5b9a \u4e49\u9ad8\u5bbd\u3001<\/p>\n<p>\u4f7f\u7528zoom:1;\uff09\uff1b\u4e5f\u53ef\u4ee5\u7ed9&lt;li&gt; \u5b9a\u4e49display:inline;\u6765\u89e3\u51b3\u6b64\u95ee\u9898\uff1b\u53e6\u5916\u8fd8\u6709\u4e00\u4e2a\u6781\u6709\u8da3\u7684\u65b9\u6cd5\uff0c\u7ed9\u5305\u542b\u7684\u6587<\/p>\n<p>\u672c\u672b\u5c3e\u6dfb\u52a0\u4e00\u4e2a\u7a7a\u683c\u3002<\/p>\n<p><span style=\"color:#ff0000\">13: IE6\u8c03\u6574\u7a97\u53e3\u5927\u5c0f\u7684 Bug<\/span><\/p>\n<p>\u5f53\u628abody\u5c45\u4e2d\u653e\u7f6e\uff0c\u6539\u53d8IE\u6d4f\u89c8\u5668\u5927\u5c0f\u7684\u65f6\u5019\uff0c\u4efb\u4f55\u5728body\u91cc\u9762\u7684\u76f8\u5bf9\u5b9a\u4f4d\u5143\u7d20\u90fd\u4f1a\u56fa\u5b9a\u4e0d\u52a8\u4e86\u3002\u89e3\u51b3\u529e\u6cd5\uff1a<\/p>\n<p>\u7ed9body\u5b9a\u4e49position:relative;\u5c31\u884c\u4e86\u3002<\/p>\n<p><span style=\"color:#ff0000\">14: \u6587\u672c\u91cd\u590dBug<\/span><\/p>\n<p>\u5728IE6\u4e2d\uff0c\u4e00\u4e9b\u9690\u85cf\u7684\u5143\u7d20\uff08\u5982\u6ce8\u91ca\u3001display:none;\u7684\u5143\u7d20\uff09\u88ab\u5305\u542b\u5728\u4e00\u4e2a\u6d6e\u52a8\u5143\u7d20\u91cc\uff0c\u5c31\u6709\u53ef\u80fd\u5f15\u53d1\u6587\u672c\u91cd\u590dbug\u3002<\/p>\n<p>\u89e3\u51b3\u529e\u6cd5\uff1a\u7ed9\u6d6e\u52a8\u5143\u7d20\u6dfb\u52a0display:inline;\u3002<\/p>\n<p><span style=\"color:#ff0000\">15\uff1a\u94fe\u63a5a\u7684title\u5c5e\u6027\u4e2d\u7684\u6587\u5b57\u6362\u884c<\/span><\/p>\n<p>\u5565\u4e5f\u4e0d\u8bf4\uff0c\u5148\u4e0a\u4e2a\u56fe<\/p>\n<p>\u6211\u4eec\u90fd\u77e5\u9053\uff0c\u53ef\u4ee5\u7ed9\u94fe\u63a5a\u52a0\u4e0atitle\u5c5e\u6027\uff0c\u8fd9\u6837\u9f20\u6807\u79fb\u52a8\u4e0a\u53bb\u4f1a\u663e\u793atitle\u5c5e\u6027\u5b9a\u4e49\u7684 \u6587\u5b57\uff0c\u5e38\u5e38\u7528\u6765\u52a0\u4e00\u4e9b\u63d0\u793a\u8bed\u53e5\uff0c<\/p>\n<p>\u6bd4\u5982\u8bf4\u70b9\u51fb\u67e5\u770b\u8be6\u60c5\u4e4b\u7c7b\u7684\uff0c\u4ee3\u7801\u5f62\u5982\uff1a<\/p>\n<p>&lt;a href=\u201d#\u201d title=\u201d\u70b9\u51fb\u67e5\u770b\u8be6\u60c5\u201d&gt;\u94fe\u63a5xx&lt;\/a&gt;<\/p>\n<p>\u3002\u4e4b\u524d\u4e00\u76f4\u6ca1\u6709\u4ed4\u7ec6\u6ce8\u610f\u8fc7\u8fd9\u4e2a\u4e1c\u897f\u3002\u5982\u679c\u9f20\u6807\u6d6e\u52a8\u4e0a\u53bb\u8981\u663e\u793a\u66f4\u591a\u4e1c\u897f\u7684\u8bdd\uff0c\u600e\u4e48\u5b9e\u73b0\u5462\u3002\u7b2c\u4e00 \u53cd\u5e94\u662fjquery\u7684tooltip\u63d2\u4ef6\u3002\u4eca\u5929\u65e0\u610f\u4e2d\u53d1\u73b0\u67d0\u4e2a\u5b66\u9662\u7684\u7f51\u7ad9\u9f20\u6807\u79fb\u52a8\u4e0a\u53bb\u53ef\u4ee5\u663e\u793a\u8fd9\u4e48\u5b8c\u6574\u7684\u4fe1\u606f\uff0c\u6548\u679c\u770b\u8d77\u6765\u4f3c\u4e4e\u8fd8\u53ef\u4ee5\uff0c\u5c31\u60f3\u770b\u770b\u600e\u4e48\u505a\u7684\uff0c \u627e\u4e86\u4e0b\uff0c\u6ca1\u53d1\u73b0\u6709Javascript\u811a\u672c\uff0c\u518d\u5f80\u94fe\u63a5\u7684\u5730\u65b9\u4e00\u770b\uff0c\u7ec8\u4e8e\u8ba9\u6211\u53d1\u73b0\u4e86\u95e8\u9053\u4e86\uff1a<\/p>\n<p>&lt;a href=&#8217;#&#8217; target=&#8221;_blank&#8221; title=&#8221;\u6807\u9898: \u5173\u4e8e\u5bf9\u6211\u68212006\u5e74\u81f32009\u5e74\u53d1\u5c55\u515a\u5458\u5de5\u4f5c\u60c5\u51b5\u8fdb\u2026<\/p>\n<p>\u53d1\u5e03\u65e5\u671f: 2010-5-31 16:05:08 \u7c7b\u522b\uff1a\u9662\u52a1\u901a\u77e5 \u70b9\u51fb: 139&#8243;&gt;<\/p>\n<p>[05-31] &nbsp;\u5173\u4e8e\u5bf9\u6211\u68212006\u5e74\u81f32009\u5e74\u53d1\u5c55\u515a\u5458\u5de5\u4f5c\u60c5\u51b5\u8fdb\u2026<\/p>\n<p>&lt;\/a&gt;<\/p>\n<p>\u6ce8\u610f\u5230\u4e86\u5417\u3002\u3002\u5f88\u7b80\u5355\uff0c\u53ea\u8981\u4f7f\u7528 \u8fd9\u6837\u7684\u8f6c\u4e49\u7b26\u53f7,\u5373\u53ef\u5b9e\u73b0\u6362\u884c\u3002\u5728\u4e00\u4e9btooltip\u8981\u6c42\u5b9a\u5236\u6027\u4e0d\u9ad8\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd9\u6837\u7684\u663e\u793a\u6548\u679c\u76f8 \u5f53\u4e0d\u9519\uff0c\u800c\u4e14\u662f\u6d4f\u89c8\u5668\u539f\u751f\u7684\u6548\u679c\uff0c\u5b89\u9038\u3002<\/p>\n<p>\u54ce\uff0c\u867d\u7136\u53f7\u79f0\u7cbe\u901adiv+css\uff0c\u4f46\u662f\u53d1\u73b0\u4e00\u4e9b\u5c0f\u5c0f\u4f46\u662f\u5f88\u5b9e\u7528\u7684\u6280\u5de7\u81ea\u5df1\u8fd8\u4e0d\u77e5\u9053\uff0c\u770b\u6765html\u8fd8\u6709\u5f88\u591a\u4e1c\u897f\u53ef\u4ee5\u6316\u6398\u3002<\/p>\n<p><span style=\"color:#ff0000\">16\uff1a\u5982\u4f55\u53bb\u6389\u70b9\u51fb\u94fe\u63a5\u65f6\u7684\u865a\u7ebf<\/span><\/p>\n<p>\u89e3\u51b3\u65b9\u68481\uff1a\u5728&lt;a href=&#8221;http:\/\/blog.sina.com\/wangfengteacher&#8221;onFocus=&#8221;this.blur()&gt; Mike blog&lt;\/a&gt;<\/p>\n<p>\u89e3\u51b3\u65b9\u68482\uff1a\u5728\u6807\u7b7e\u4e2d\u52a0\u5165 hidefocus&lt;a href=&#8221;http:\/\/blog.sina.com\/wangfengteacher&#8221;hidefocus&gt; Mike blog&lt;\/a&gt;<\/p>\n<p>\u89e3\u51b3\u65b9\u68483: \u5982\u679c\u8fde\u63a5\u592a\u591a\uff0c\u53ef\u4ee5\u7528\u5916\u90e8\u94fe\u63a5 .HTC \u6587\u4ef6\u3002\u5982\uff0cblur.htc<\/p>\n<p>\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<p>&lt;public:attach event=&#8221;onfocus&#8221;<\/p>\n<p>onevent=&#8221;makeblur()&#8221;&gt;&lt;\/public:attach&gt;<\/p>\n<p>&lt;SCRIPT language=javascript&gt;<\/p>\n<p>function makeblur(){<\/p>\n<p>this.blur();<\/p>\n<p>}<\/p>\n<p>&lt;\/SCRIPT&gt;<\/p>\n<p>\u5728 CSS \u4e2d\u52a0\u5165\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>A { behavior:url(blur.htc); }<\/p>\n<p>\u89e3\u51b3\u65b9\u68484 ( \u63a8\u8350 )\uff1a\u4f7f\u7528CSS\u6837\u5f0f\uff0c\u53ef\u52a0\u5165\u4ee3\u7801\uff1aa {blr:expression_r(this.onFocus=this.blur())}<\/p>\n<p>\u5982\u679c\u662fFF\u7b49\u6d4f\u89c8\u5668\u7684\u8bdd\u53ef\u8fd9\u6837\u5199 a{ouline:none;}<\/p>\n<p><span style=\"color:#ff0000\">17:\u5236\u4f5c1px\u7ec6\u7ebf\u8868\u683c<\/span><\/p>\n<p>\u89e3\u51b3\u65b9\u68481 ( \u63a8\u8350)\uff1a\u6211\u4eec\u53ea\u8981\u7ed9\u8fd9\u4e2atable\u4e00\u4e2aborder-collapse:collapse\u7684\u6837\u5f0f\uff0c\u5c31\u53ef\u4ee5\u8fbe\u5230\u8fd9\u4e2a\u6548\u679c\u4e86\u3002<\/p>\n<p>\u5177\u4f53\u5982\u4e0b\uff1a<\/p>\n<p>1\u3001HTML\u7ed3\u6784:<\/p>\n<p>&lt;table width=&#8221;300&#8243; border=&#8221;1&#8243; cellpadding=&#8221;0&#8243;cellspacing=&#8221;0&#8243; bordercolor=&#8221;#C0C0C0&#8243;<\/p>\n<p>style=&#8221;border-collapse:collapse;&#8221;&gt;<\/p>\n<p>&lt;tr&gt;<\/p>\n<p>&lt;td&gt; &lt;\/td&gt;<\/p>\n<p>&lt;td&gt; &lt;\/td&gt;<\/p>\n<p>&lt;\/tr&gt;<\/p>\n<p>&lt;tr&gt;<\/p>\n<p>&lt;td&gt; &lt;\/td&gt;<\/p>\n<p>&lt;td&gt; &lt;\/td&gt;<\/p>\n<p>&lt;\/tr&gt;<\/p>\n<p>&lt;tr&gt;<\/p>\n<p>&lt;td&gt; &lt;\/td&gt;<\/p>\n<p>&lt;td&gt; &lt;\/td&gt;<\/p>\n<p>&lt;\/tr&gt;<\/p>\n<p>&lt;\/table&gt;<\/p>\n<p><span style=\"color:#ff0000\">18\uff1aIE6 \u4e0bz-index\u65e0\u6548<\/span><\/p>\n<p>\u5728CSS\u4e2d\uff0c\u901a\u8fc7z-index\u8fd9\u4e2a\u5c5e\u6027\u6539\u53d8\u5c42\u7ea7\uff0c\u8981\u8ba9z-index\u8d77\u4f5c\u7528\u6709\u4e2a\u524d\u63d0\uff0c\u5c31\u662f\u5143\u7d20\u7684position\u5c5e\u6027\u8981 \u662frelative\uff0cabsolute\u6216\u662ffixed\u3002<\/p>\n<p>z-index\u5c42\u7ea7\u8d8a\u9ad8\uff0c\u5185\u5bb9\u8d8a\u5e94\u8be5\u5728\u4e0a\u9762\u663e\u793a\u3002\u5728\u5927\u90e8\u5206\u7684\u6d4f\u89c8\u5668\u5728\u5927\u90e8\u5206\u7684\u60c5\u51b5\u4e0b\uff0c\u786e\u5b9e\u5982\u6b64\uff0c\u4f46\u662f\u4e0d\u7edd\u5bf9\uff0c\u5c24\u5176\u9047\u5230IE6\u3002<\/p>\n<p>1\u3001\u5173\u4e8e\u6548\u679c\u622a\u56fe\u7684\u4e9b\u5fc5\u8981\u8bf4\u660e<\/p>\n<p>\u4e0b\u9762\u7684\u4e0d\u662f\u5e9f\u8bdd\uff0c\u662f\u4e3a\u4e86\u66f4\u5bb9\u6613\u7684\u7406\u89e3\u6211\u4e0b\u9762\u553e\u6cab\u6a2a\u98de\u7684\u5185\u5bb9\u3002<\/p>\n<p>\u4ee5\u4e0b\u6240\u6709\u7ed3\u679c\u622a\u56fe\u7684\u5927\u80cc\u666f\u5982\u4e0b\uff1a<\/p>\n<p>1\u3001\u9875\u9762\u4e0a\u56fa\u5b9a\u4e0d\u52a8\u7684\uff0c\u4e00\u6210\u4e0d\u53d8\u7684\uff0c\u9001\u8c6a\u5b85\u4e5f\u4e0d\u4f1a\u4ece\u826f\u7684\u662f\u4e00\u4e2a\u9ed1\u8272\u80cc\u666f\uff0c\u900f\u660e\u5ea6 40%\uff0c\u51e0\u4e4e\u6ee1\u5c4f\u663e\u793a\u7684\u5c42\u7ea7\u4e3a1\u7684\u7edd\u5bf9\u5b9a\u4f4d\u5c42\u3002HTML\u4e3a\uff1a<\/p>\n<p>&lt;div&gt;&lt;\/div&gt;<\/p>\n<p>\u5bf9\u5e94CSS\u4e3a\uff1a#blank{width:100%; height:600px; background:black; opacity:0.4; filter:alpha(opacity=40); position:absolute; left:0; top:0; z-index:1;}<\/p>\n<p>\u4f5c\u7528\u662f\u4e3a\u4e86\u8ba9\u5c42\u7ea7\u5173\u7cfb\u4e00\u76ee\u4e86\u7136\u3002\u770b\uff1a<\/p>\n<p>\u8fd9\u8bf4\u660e\u5185\u5bb9\u5728z-index\u4e3a1\u7684\u7edd\u5bf9\u5b9a\u4f4d\u5c42\u4e4b\u4e0b\u3002<\/p>\n<p>\u8fd9\u8bf4\u660e\u5185\u5bb9\u5728z-index\u4e3a1\u7684\u7edd\u5bf9\u5b9a\u4f4d\u5c42\u4e4b\u4e0a\u3002<\/p>\n<p>2\u3001\u9875\u9762\u4e0a\u505a\u5bf9\u6bd4\u7684\u662f\u7f8e\u5973\u56fe\u7247\uff0c\u56fe\u7247\u5728\u534a\u900f\u660e\u9ed1\u8272\u7edd\u5bf9\u5b9a\u4f4d\u5c42\u7684\u4e0a\u9762\u8fd8\u662f\u4e0b\u9762\u5f88\u5bb9\u6613\u8fa8\u522b\uff0c\u8fd9\u6837\uff0c\u60a8\u5c31\u80fd\u591f\u5bf9\u6211\u6240\u8bf4\u7684z- index\u4e0d\u8d77\u4f5c\u7528\u6709\u5f88\u76f4\u89c2\u7684\u8ba4\u8bc6\u4e86\u3002<\/p>\n<p>2\u3001IE6\u7684\u62b1\u6028\uff1a\u6d6e\u52a8\u8ba9\u6211\u6c89\u6ca6<\/p>\n<p>\u73b0\u5728\u5f00\u59cb\u771f\u6b63\u7684\u8bb2\u8ff0 \u95ee\u9898\u7684\u4ea7\u751f\uff0c\u539f\u56e0\u4ee5\u53ca\u89e3\u51b3\u4e86\u3002\u9996\u5148\u8bb2\u8bb2\u7b2c\u4e00\u79cdz-index\u65e0\u8bba\u8bbe\u7f6e\u591a\u9ad8\u90fd\u4e0d\u8d77\u4f5c\u7528\u60c5\u51b5\u3002\u8fd9\u79cd\u60c5\u51b5\u53d1\u751f\u7684\u6761\u4ef6\u6709\u4e09\u4e2a\uff1a1\u3001\u7236\u6807\u7b7e position\u5c5e\u6027\u4e3arelative\uff1b2\u3001\u95ee\u9898\u6807\u7b7e\u65e0position\u5c5e\u6027\uff08\u4e0d\u5305\u62ecstatic\uff09\uff1b3\u3001\u95ee\u9898\u6807\u7b7e\u542b\u6709\u6d6e\u52a8(float)\u5c5e\u6027\u3002<\/p>\n<p>\u60a8 \u53ef\u4ee5\u62ff\u4e0b\u9762\u7684\u4ee3\u7801\u81ea\u5df1\u505a\u4e2a\u7b80\u5355\u6d4b\u8bd5\uff1a<\/p>\n<p>&lt;div&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div style=&#8221;position:relative; z-index:9999;&#8221;&gt;<\/p>\n<p>&lt;img style=&#8221;float:left;&#8221; src=&#8221;.\/wp-content\/uploads\/hibaidu\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm2.jpg&#8221; \/&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>\u4e2b\u7684\uff0c\u8fd9z-index\u90fd9999\u4e86\uff0c\u5c42\u7ea7\u591f\u9ad8\u5427\uff0c\u4f46\u662f\uff0c\u770b\u4e0b\u9762\u7684\u56fe\uff1a<\/p>\n<p>\u8fd9\u4e00\u5bf9\u6bd4\u5c31\u77e5\u9053\u95ee\u9898\u4e86\uff0c\u53ef\u80fd\u6709\u4eba\u4f1a\u7591\u95ee\uff0c\u8fd9\u4f1a\u4e0d\u4f1a\u662fIE6\u7684relative\u81ea\u5df1\u611f\u5192\u4e86\uff0c\u800c\u4e0d\u662f\u6d6e\u52a8(float)\u643a\u5e26 \u4e86\u201c\u7532\u6d41\u75c5\u6bd2\u201d\u3002\u597d\uff0c\u6211\u73b0\u5728\u53bb\u6389\u6d6e\u52a8\uff0cHTML\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>&lt;div&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div style=&#8221;position:relative; z-index:9999;&#8221;&gt;<\/p>\n<p>&lt;img src=&#8221;.\/wp-content\/uploads\/hibaidu\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm2.jpg&#8221; \/&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>\u7ed3\u679cIE6\u4e0b\uff1a<\/p>\n<p>\u6211\u60f3\uff0c\u95ee\u9898\u5e94\u8be5\u90fd\u6e05\u695a\u4e86\uff0c\u81f3\u4e8e\u539f\u56e0\uff0c\u6211\u8d77\u521d\u4ee5\u4e3a\u662fhaslayout\u641e\u7684\u9b3c\uff0c\u540e\u6765\uff0c\u7528zoom\u4e00\u6d4b\u8bd5\uff0c\u53d1\u73b0\u4e0d\u662f\uff08IE7 \u4e0b\u65e0\u6b64bug\u4e5f\u8bc1\u660e\u4e0d\u662f haslayout\u7684\u539f\u56e0\uff09\uff0c\u4f3c\u4e4e\u5c31\u662f\u8fd9\u4e2afloat\u4f1a\u8ba9z-index\u5931\u6548\u3002\u7531\u4e8e\u5c06\u5916\u90e8div\u7684position:relative\u5c5e\u6027\u6539\u4e3a absolute\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\uff0c\u6211\u5c31\u6000\u7591\u662f\u4e0d\u662f\u6d6e\u52a8\u8ba9relative\u53d1\u751f\u4e86\u4e9b\u53d8\u5316\uff0cfloat\u4e0erelative\u5728\u6c34\u5e73\u5b9a\u4f4d\u4e0a\u53ef\u4ee5\u8bf4\u662f\u8fd1\u4eb2\uff0c\u4f1a\u4e0d\u4f1a \u662f\u56e0\u4e3a\u8fd9\u4e24\u8005\u6405\u548c\u5728\u4e00\u8d77\u6240\u4ee5\u4ec0\u4e48\u201c\u7578\u5f62\u201d\u201c\u4f53\u5f31\u591a\u75c5\u201d\u5c31\u51fa\u73b0\u4e86\u3002\u8fd9\u4ec5\u662f\u6211\u7684\u731c\u6d4b\u800c\u5df2\uff0c\u771f\u6b63\u7684\u539f\u56e0\u8fd8\u662f\u53bb\u95eeIE6\u7684\u540e\u5988\u5427\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff0c\u89e3\u51b3\u65b9\u6cd5\u6709\u4e09\uff0c1\u3001position:relative\u6539 \u4e3aposition:absolute\uff1b2\u3001\u53bb\u9664\u6d6e\u52a8\uff1b3\u3001\u6d6e\u52a8 \u5143\u7d20\u6dfb\u52a0position\u5c5e\u6027\uff08\u5982relative\uff0cabsolute\u7b49\uff09\u3002<\/p>\n<p>3\u3001\u56fa\u6267\u7684IE6\uff1a\u5b83\u53ea\u8ba4\u7b2c\u4e00\u4e2a\u7238\u7238<\/p>\n<p>\u53ef\u80fd\u4e0d\u5c11\u4eba\u77e5 \u9053\uff0c\u8fd9IE6\u4e0b\uff0c\u5c42\u7ea7\u7684\u9ad8\u4f4e\u4e0d\u4ec5\u8981\u770b\u81ea\u5df1\uff0c\u8fd8\u8981\u770b\u81ea\u5df1\u7684\u8001\u7238\u8fd9\u4e2a\u540e\u53f0\u662f\u5426\u591f\u786c\u3002\u7528\u672f\u8bed\u5177\u4f53\u63cf\u8ff0\u4e3a\uff1a<\/p>\n<p>\u7236\u6807\u7b7eposition\u5c5e\u6027\u4e3arelative \u6216absolute\u65f6\uff0c\u5b50\u6807\u7b7e\u7684absolute\u5c5e\u6027\u662f\u76f8\u5bf9\u4e8e\u7236\u6807\u7b7e\u800c\u8a00\u7684\u3002\u800c\u5728IE6\u4e0b\uff0c\u5c42\u7ea7\u7684\u8868\u73b0\u6709\u65f6\u5019\u4e0d\u662f\u770b\u5b50\u6807\u7b7e\u7684z-index\u591a\u9ad8\uff0c\u800c\u8981\u770b\u5b83 \u4eec\u7684\u7236\u6807\u7b7e\u7684z-index\u8c01\u9ad8\u8c01\u4f4e\u3002<\/p>\n<p>\u6709\u4e00\u5b9a\u7ecf\u9a8c\u7684\u4eba\u53ef\u80fd\u90fd\u77e5\u9053\u4e0a\u9762\u7684\u4e8b\u5b9e\u3002\u4f46\u662f\uff0c\u76f8\u4fe1\u8fd9\u91cc\u9762\u5f88\u591a\u4eba\u4e0d\u77e5\u9053IE6\u4e0b\uff0c\u51b3\u5b9a\u5c42\u7ea7\u9ad8\u4f4e\u7684\u4e0d\u662f\u5f53\u524d\u7684\u7236\u6807\u7b7e\uff0c\u800c\u662f\u6574 \u4e2aDOM tree\uff08\u8282\u70b9\u6811\uff09\u7684\u7b2c\u4e00\u4e2arelative\u5c5e\u6027\u7684\u7236\u6807\u7b7e\u3002\u6709\u65f6\u5e73\u65f6\u6211\u4eec\u591a\u5904\u7406\u4e00\u4e2a\u7236\u6807\u7b7e\uff0cz-index\u5c42\u7ea7\u591a\u800c\u590d\u6742\u7684\u60c5\u51b5\u4e0d\u591a\u89c1\uff0c\u6240\u4ee5\u96be\u514d\u4f1a\u6709\u8ba4\u8bc6\u4e0a \u7684\u5c0f\u5c0f\u504f\u5dee\u3002<\/p>\n<p>\u597d\uff0c\u4e0b\u9762\u5c55\u793a\u8fd9\u4e2abug\u3002<\/p>\n<p>\u6761\u4ef6\u5f88\u7b80\u5355\uff0c\u53ea\u8981\u7edd\u5bf9\u5b9a\u4f4d\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u7238\u7238\uff0c\u6216\u8005\u8bf4\u662f\u6700\u8001\u7684\u90a3\u4e2a\u7238\u7238\u7ea7\u522b\u7684\u4eba\u7684relative\u5c5e\u6027\u5c0f\u4e8e\u9ed1\u8272\u534a \u900f\u660e\u5c42\u7684z-index\u5c42\u7ea7\u3002\u4f8b\u5982\u4e0b\u9762\u7684HTML\u4ee3\u7801\uff1a<\/p>\n<p>&lt;div&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div style=&#8221;position:relative;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221;position:relative; z-index:1000;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221;position:absolute; z-index:9999;&#8221;&gt;<\/p>\n<p>&lt;img src=&#8221;.\/wp-content\/uploads\/hibaidu\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm3.jpg&#8221; \/&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>\u53ef\u4ee5\u770b\u5230\uff0cmm3\u56fe\u7247\u7684\u7236\u6807\u7b7ediv \u662f\u7edd\u5bf9\u5b9a\u4f4d\uff0c\u5c42\u7ea79999\uff0c\u6bd41\u5927\u591a\u4e86\uff0c\u7edd\u5bf9\u5b9a\u4f4d\u7684\u7236\u6807\u7b7e\u5c42\u7ea71000(10000\u4e5f\u4e00\u6837)\uff0c\u4e5f\u6bd4\u9ed1\u8272\u534a\u900f\u660e\u5c42\u7684z-index:1\u5927\u591a\u4e86\uff0c\u4f46\u662f\uff0c\u6211\u4eec\u53ef \u601c\u7684IE6\u7ae5\u978b\u2014\u2014<\/p>\n<p>\u518d\u770b\u770b\u4ee5Firefox\u4e3a\u4ee3\u8868\u7684\u5176\u4ed6\u7ae5\u978b\uff1a<\/p>\n<p>IE7\u4e0eIE6\u6709\u7740\u540c\u6837\u7684bug\uff0c\u539f\u56e0\u5f88\u7b80\u5355\uff0c\u867d\u7136\u56fe\u7247\u6240\u5728div\u5f53\u524d\u7684\u8001\u7238\u5c42\u7ea7\u5f88\u9ad8(1000)\uff0c\u4f46\u662f\u7531\u4e8e\u8001\u7238\u7684\u8001\u7238 \u4e0d\u9876\u7528\uff0c\u53ef\u601c\u4e869999\u5982\u6b64\u5f3a\u52bf\u7684\u5b69\u5b50\u6ca1\u6709\u51fa\u5934\u4e4b\u65e5\u554a\uff01<\/p>\n<p>\u77e5\u9053\u539f\u56e0\u89e3\u51b3\u5c31\u5f88\u8f7b\u677e\u4e86\uff0c\u7ed9\u7b2c\u4e00\u4efb\u8001\u7238\u6dfb\u52a0z-index\u540e\u7684HTML\u4ee3 \u7801\u5982\u4e0b\uff1a<\/p>\n<p>&lt;div&gt;&lt;\/div&gt;<\/p>\n<p>&lt;div style=&#8221;position:relative; z-index:1;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221;position:relative; z-index:1000;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221;position:absolute; z-index:9999;&#8221;&gt;<\/p>\n<p>&lt;img src=&#8221;.\/wp-content\/uploads\/hibaidu\/image.zhangxinxu.com\/image\/study\/s\/s256\/mm3.jpg&#8221; \/&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>\u7ed3\u679cIE6\u7ae5\u978b\u559c\u7b11\u989c\u5f00\uff0c\u6625\u5149\u707f\u70c2\uff1a<\/p>\n<p><span style=\"color:#ff0000\">19\uff1acss reset\u4e2d\u7684list-style:none<\/span><\/p>\n<p>\u5728IE6,7\u4e0b,\u5f53UL\u4e0d\u5177\u6709float:left;display:inline;\u65f6:<\/p>\n<p>\u65e0\u8bba\u6709\u6ca1\u6709list-style:none\u8fd9\u4e2a\u5c5e\u6027,\u5217 \u8868\u7b26\u90fd\u88ab\u9690\u85cf,\u4e0d\u5360\u4f4d\u7f6e(\u4e0b\u9762\u4ee3\u7801\u4e2d\u76845,6)<\/p>\n<p>\u5f53UL\u5177\u6709float:left;display:inline;\u5c5e\u6027\u65f6<\/p>\n<p>list- style:none,\u5217\u8868\u7b26\u88ab\u9690\u85cf,\u4f46\u662f\u4ecd\u7136\u7559\u6709\u4f4d\u7f6e(list-style-position:inside);<\/p>\n<p>\u672a \u8bbe\u7f6elist-style:none;\u5217\u8868\u7b26\u88ab\u9690\u85cf,\u4e5f\u4e0d\u5360\u4f4d(list-style-position:outside)<\/p>\n<p>\u5728firefox\u4e2d\u53ea\u8981list-style-type\u4e3anone ,\u5219 \u65e0\u8bbalist-stype-position\u7684\u503c\u4e3aoutside\u6216inside , list-style\u90fd\u80fd\u5f88\u597d\u7684\u88ab\u9690\u85cf<\/p>\n<p>\u800c\u5728IE6,7\u4e2d,\u4ec5 \u8bbe\u7f6elist-style:none,\u5e76\u4e0d\u8db3\u4ee5\u89e3\u51b3\u6240\u6709\u95ee\u9898<\/p>\n<p>\u6240\u4ee5\u6211\u8ba4\u4e3a\u5728css reset\u7684\u65f6\u5019\u4f7f\u7528 list-style:none outside none \u66f4\u597d<\/p>\n<p><span style=\"color:#ff0000\">20\uff1a\u94fe\u63a5\u53bb\u8fb9\u7ebf\uff08\u5b8c\u5168\u517c\u5bb9\uff09<\/span><\/p>\n<p>a,a:hover{outline:none; blur:expression(this.onFocus=this.blur());}<\/p>\n<p><span style=\"color:#ff0000\">21: display:inline-block \u989d\u5916\u4ea7\u751f\u76846PX \u6216\u80054px margin<\/span><\/p>\n<p>\u4eca\u5929\u5728\u505a\u4e00\u4e2aTimeline\u7684\u6a21\u5757\u7684\u65f6\u5019\u9047\u5230\u4e00\u4e2a\u68d8\u624b\u7684\u95ee\u9898\uff1a \u7ed9\u5143\u7d20\u6dfb\u52a0display:inline-block \u5c5e\u6027\u7684\u65f6\u5019\u4f1a\u4ea7\u751f\u989d\u5916\u76844px\u7684margin-right\u3002<\/p>\n<p>\u539f\u59cb\u4ee3\u7801<\/p>\n<p>.YP_timelineChart_box li{<\/p>\n<p>display:-moz-inline-stack;<\/p>\n<p>display:inline-block;<\/p>\n<p>zoom:1;<\/p>\n<p>*display:inline;<\/p>\n<p>text-indent:-3000px;<\/p>\n<p>width:5px;<\/p>\n<p>vertical-align:bottom;<\/p>\n<p>background-color:#00FF00;<\/p>\n<p>position:relative;<\/p>\n<p>}<\/p>\n<p>\u9875\u9762\u6e32\u67d3\u7ed3\u679c\uff1a<\/p>\n<p>\u6bcf\u4e00\u5217\u90fd\u4f1a\u5411\u53f3\u4ea7\u751f\u5916\u8fb9\u8ddd4px\uff0c\u82e6\u601d\u4e0d\u5f97\u5176\u89e3\uff0c\u5c1d\u8bd5\u8d1f\u7684\u5916\u8fb9\u8ddd\uff0c\u4f46\u662f\u6d89\u53ca\u5230\u5176\u4ed6\u7684\u95ee\u9898:\u6bcf\u4e2ali\u6807\u7b7e\u4f1a\u91cd\u53e01-2\u4e2apx\uff0c\u59a8\u788d\u5230\u9f20\u6807hover\u72b6 \u6001\u7684\u4e8b\u4ef6\u3002\u5c1d\u8bd5\u4fee\u6539doctype\u7c7b\u578b\u4e5f\u4e0d\u89c1\u6548\u679c\u3002\u540e\u6765\u5c1d\u8bd5\u4e86\u53e6\u5916\u4e00\u4e2a\u65b9\u6cd5\uff1a<\/p>\n<p>\u628a\u539f\u6765\u7684HTML \u4ee3\u7801\u7ed3\u6784\uff1a<\/p>\n<p>\u66f4\u6539\u4e3a\uff1a<\/p>\n<p>\u8fd9\u6837\u5c31\u4e0d\u4f1a\u4ea7\u751f\u989d\u5916\u7684\u5916\u8fb9\u8ddd\uff0c\u4e5f\u5f04\u4e0d\u6e05\u695a\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8fd9\u79cd\u95ee\u9898\u3002\u5148\u6682\u65f6\u8bb0\u4e0b\uff0c\u4ee5\u540e\u518d\u7814\u7a76\u7814\u7a76\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color:#ff0000\">22: IE6\u4e2d\u4f2a\u7c7b:hover\u7684\u4f7f\u7528\u53caBUG<\/span><\/p>\n<p>\u4ee5\u524d\u672a\u66fe\u9047\u5230\u7c7b\u4f3c\u7684\u95ee\u9898\uff0c\u4e00\u756agoogle\uff0c\u624d\u77e5\u9053\u8fd9\u662fIE6\u5904\u7406CSS\u4f2a\u7c7b:hover\u7684Bug\u3002\u4f8b\u5982\u5982\u4e0b\u7684\u4ee3\u7801\uff1a<\/p>\n<p>&lt;style&gt;<\/p>\n<p>a {color: #333;}<\/p>\n<p>a span {color: green;}<\/p>\n<p>a:hover {}<\/p>\n<p>a:hover span {color: red; }<\/p>\n<p>&lt;\/style&gt;<\/p>\n<p>&lt;a href=\u201dhttp:\/\/www.taobao.com\u201c&gt; \u6dd8\u5b9d\u7f51 &lt;span&gt; \u6dd8\u4f60\u559c\u6b22 &lt;\/span&gt;&lt;\/a&gt;<\/p>\n<p>\u5728IE7\/FF\u4e2d\uff0c\u9f20\u6807\u79fb\u52a8\u5230\u94fe\u63a5\u4e0a\u65f6\uff0c\u201d\u6dd8\u4f60\u559c\u6b22\u201d\u5b57\u6837\u4f1a\u53d8\u4e3a\u7ea2\u8272\uff0c\u4f46IE6\u5219\u65e0\u53cd\u5e94\u3002\u6240\u4ee5IE6\u7684bug\u5c31\u662f\u5982\u679ca \u4e0e a:hover \u7684css\u5b9a\u4e49\u662f\u4e00\u6837\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\u5982\u679ca:hover \u4e2d\u6ca1\u6709\u6837\u5f0f\u7684\u6539\u53d8\uff0chover\u5c31\u4e0d\u4f1a\u88ab\u89e6\u53d1\u3002\u4f46\u5982\u679c\u5728a:hover{}\u589e\u52a0\u4e00\u4e9b\u7279\u5b9a\u7684\u5c5e\u6027\uff0c\u4f8b\u5982<\/p>\n<p>a:hover{border:none;}<\/p>\n<p>\u6216\u8005<\/p>\n<p>a:hover{padding:0;}<\/p>\n<p>\u53c8\u6216\u8005<\/p>\n<p>a:hover{background: none;}<\/p>\n<p>\u6b64\u65f6hover\u5c31\u53ef\u4ee5\u89e6\u53d1\u4e86\u3002<\/p>\n<p><span style=\"color:#ff0000\">23\uff1a\u539f\u6765IE6\u652f\u6301!important<\/span><\/p>\n<p>.demo { color:#F00!important; color:#000; }\/*IE6\u663e\u793a\u9519\u8bef\u7406\u89e3\uff1a.demo\u663e\u793a\u4e3a\u9ed1\u8272*\/<\/p>\n<p>\/*\u800c\u4e0b\u9762IE6\u662f\u6b63\u786e\u7406\u89e3\u7684\uff1a.demo\u663e\u793a\u4e3a\u7ea2\u8272*\/<\/p>\n<p>.demo { color:#F00!important;}<\/p>\n<p>.demo { color:#000; }<\/p>\n<p><span style=\"color:#ff0000\">24:\u53bb\u6389button\u6309\u94ae\u5de6\u53f3\u4e24\u8fb9\u7684\u7559\u767d<\/span><\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>&lt;meta charset=&#8221;utf-8&#8243; \/&gt;<\/p>\n<p>&lt;style&gt;<\/p>\n<p>*{padding:0; margin:0}<\/p>\n<p>input,button{overflow:visible;padding:0;}<\/p>\n<p>&lt;\/style&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;form id=&#8221;form1&#8243; name=&#8221;form1&#8243; method=&#8221;post&#8221; action=&#8221;&#8221;&gt;<\/p>\n<p>&lt;input type=&#8221;submit&#8221; name=&#8221;button&#8221; id=&#8221;button&#8221; value=&#8221;button\u6309\u94ae\u5de6\u53f3\u7559\u767d\u7684\u89e3\u51b3\u65b9\u6cd5&#8221; \/&gt;<\/p>\n<p>&lt;\/form&gt;<\/p>\n<p>&lt;button&gt;&lt;span&gt;button\u6309\u94ae\u5de6\u53f3\u7559\u767d\u7684\u89e3\u51b3\u65b9\u6cd5&lt;\/span&gt;&lt;\/button&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><span style=\"color:#ff0000\">25:\u4e2d\u6587\u5b57\u4f53\u5728css\u4e2d\u7684\u5199\u6cd5<\/span><\/p>\n<p>\u9ed1\u4f53SimHei\\9ED1\\4F53\u9ed1\u4f53<\/p>\n<p>\u5b8b\u4f53SimSun\\5B8B\\4F53\u5b8b\u4f53<\/p>\n<p>\u65b0\u5b8b\u4f53 NSimSun\\65B0\\5B8B\\4F53\u65b0\u5b8b\u4f53<\/p>\n<p>\u4eff\u5b8bFangSong\\4EFF\\5B8B\u4eff\u5b8b<\/p>\n<p>\u6977\u4f53KaiTi\\6977\\4F53 \u6977\u4f53<\/p>\n<p>\u5fae\u8f6f\u6b63\u9ed1\u4f53Microsoft JhengHei\\5FAE\\x8F6F\\6B63\\9ED1\\4F53\u5fae\u8f6f\u6b63\u9ed1\u4f53<\/p>\n<p>\u5fae\u8f6f\u96c5\u9ed1Microsoft YaHei\\5FAE\\8F6F\\96C5\\9ED1\u5fae\u8f6f\u96c5\u9ed1<\/p>\n<p>\u5e7c\u5706 YouYuan\\5E7C\\5706\u5e7c\u5706<\/p>\n<p><span style=\"color:#ff0000\">26\uff1a ie6\u91ccwidth:100%\u662f\u76f8\u5bf9\u4e8e\u4e0a\u6709\u9ad8\u5ea6\u8bbe\u7f6e\u7684\u5143\u7d20 \u5176\u4ed6\u6d4f\u89c8\u5668\u662f\u76f8\u5bf9\u4e8e\u4e0a\u4e2a\u76f8\u5bf9\u5b9a\u4f4d\u6216\u7edd\u5bf9\u5b9a\u4f4d\u7684\u5143\u7d20<\/span><\/p>\n<p>&lt;div style=&#8221; width:600px; height:600px; background:#000;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221; width:500px; height:500px; background:#333;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221; float:left; background:#666; width:400px;&#8221; &gt;<\/p>\n<p>&lt;div style=&#8221; width:300px; height:300px; background:#999;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221; width:100%; height:100%; background:#f00; position:absolute; left:0; top:0;&#8221;&gt;<\/p>\n<p>\u5728\u975eie6\u7684\u6d4f\u89c8\u5668\u4e2d\u90fd\u662f\u6ee1\u5c4f\u5e55\u7684\u7ea2\uff0c \u8bf4\u660e\u975eie6\u7684\u6d4f\u89c8\u5668\u7684width\u548cheight\u7684\u767e\u5206\u6bd4\uff0c\u90fd\u662f\u76f8\u5bf9\u7684\u4e0a\u4e2a\u76f8\u5bf9\u5b9a\u4f4d\u6216\u8005\u7edd\u5bf9\u5b9a\u4f4d\u7684\u5143\u7d20\uff0c\u6ca1\u6709\u5c31\u4e3ahtml\u5143\u7d20\uff0c\u800cie6\u4e2d\u7684width\u548cheight \u7684\u767e\u5206\u6bd4\uff0c\u76f8\u5bf9\u7684\u662f\u4e0a\u4e2a\u6709\u9ad8\u5bbd\u663e\u793a\u8bbe\u7f6e\u7684\u5143\u7d20\uff0c\u800c\u4e14height\u7684\u767e\u5206\u6bd4\u8bbe\u7f6e\u5931\u6548\uff0c\u6240\u4ee5\u4e0a\u8ff0\u4ee3\u7801\u5728ie6\u4e2d\u5c31\u51fa\u73b0\u5bbd\u5ea6\u7a7f\u8d8a\u4e86\u4ed6\u7684\u7236\u5143\u7d20\u800c\u9047\u89c1width:500px;\u7684\u5143\u7d20\u7684\u65f6\u5019\uff0c\u8fb9\u628a\u81ea\u5df1\u8bbe\u7f6e\u6210\u4e86width:500px;\u800cheight\u7684\u8bbe\u7f6e\u5219\u5931\u6548\uff0c \u8fd9\u4e2a\uff0c \u8ba9\u4eba\u5f88\u86cb\u75bc\uff01ie6\uff0c\u771f\u7684\u8be5\u65e9\u70b9\u8d70\u4e86\uff01<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p><span style=\"color:#ff0000\">27\uff1a ie\u4e0d\u7f13\u5b58\u80cc\u666f\u56fe\u7247\u7684\u89e3\u51b3\u529e\u6cd5<\/span><\/p>\n<p>\u9ad8\u6027\u80fdweb\u5f00\u53d1\u4e2d\uff0c\u4e00\u5f20\u5c0f\u5c0f\u7684\u56fe\u7247\u8bf7\u6c42\u80fd\u7701\u7684\u5c31\u7701\uff0c\u53efIE6\u5b58\u5728\u4e0d\u7f13\u5b58\u80cc\u666f\u56fe\u7684bug.\u5982\u679c\u91cd\u590d\u4f7f\u7528\u4e86\u4e00\u4e2a\u56fe\u7247\u4f5c\u4e3a\u80cc\u666f\uff0c\u90a3\u4e48\u6bcf\u7528\u4e00\u6b21\u5c31\u4f1a\u91cd\u65b0\u53bb\u670d\u52a1\u5668\u62c9\u4e00\u6b21\u3002\u3002\u3002\u7ed9\u670d\u52a1\u5668\u5e26\u6765\u5de8\u5927\u7684\u538b\u529b\u3002\u89e3\u51b3\u65b9\u6cd5\u6709\u4e24\u79cd\uff0c<\/p>\n<p>1\uff1a\u91c7\u7528JS<\/p>\n<p>var ua = navigator.userAgent.toLowerCase();<\/p>\n<p>var isIE6 = ua.indexOf(&#8220;msie 6&#8221;) &gt; -1;\/\/\u5224\u65ad\u662f\u5426\u4e3aIE6<\/p>\n<p>\/\/ remove css image flicker<\/p>\n<p>\/\/IE6\u4e0b\u9ed8\u8ba4\u4e0d\u7f13\u5b58\u80cc\u666f\u56fe\u7247\uff0cCSS\u91cc\u6bcf\u6b21\u66f4\u6539\u56fe\u7247\u7684\u4f4d\u7f6e\u65f6\u90fd\u4f1a\u91cd\u65b0\u53d1\u8d77\u8bf7\u6c42\uff0c\u7528\u8fd9\u4e2a\u65b9\u6cd5\u544a\u8bc9IE6\u7f13\u5b58\u80cc\u666f\u56fe\u7247<\/p>\n<p>if(isIE6){<\/p>\n<p>try{<\/p>\n<p>document.execCommand(&#8220;BackgroundImageCache&#8221;, false, true);<\/p>\n<p>}catch(e){}<\/p>\n<p>}<\/p>\n<p>2.\u5728\u9875\u9762\u4e0a\u76f4\u63a5\u4f7f\u75281\u4e2aDIV\u5143\u7d20\u6765\u52a0\u8f7d\u8be5\u56fe\u7247\uff0c\u8fd9\u6837\u52a0\u8f7d\u56fe\u7247\u5c31\u80fd\u771f\u6b63\u88ab\u7f13\u5b58\uff0c\u9f20\u6807\u79fb\u52a8\u4e5f\u4e0d\u4f1a\u53d1\u9001\u8bf7\u6c42\u4e86\u3002<\/p>\n<p><span style=\"color:#ff0000\">28:ie6\u4e0bcss\u5b9e\u73b0max\/min-width\/height<\/span><\/p>\n<p>_width:expression(this.width&gt;300?&#8221;300px&#8221;:ture); max-width:300px;<\/p>\n<p>_height:expression(this.height&gt;300?&#8221;300px&#8221;:ture); max-height:300px;<\/p>\n<p><span style=\"color:#ff0000\">29\uff1acss\u7a7a\u767d\u5916\u8fb9\u8ddd\u4e92\u76f8\u53e0\u52a0\u7684\u89e3\u51b3\u65b9\u6cd5<\/span><\/p>\n<p>body{width:300px; font-family:&#8217;\u5fae\u8f6f\u96c5\u9ed1&#8217;; font-size:1em; text-indent:10px; line-height:1.25;}<\/p>\n<p>div{background:#000;margin:10px;}<\/p>\n<p>div p{background:#f60;margin:15px}<\/p>\n<p>\u8fd9\u662f\u4e00\u4e2adiv\u5143\u7d20\u5185\u5d4c\u5957p\u7684\u7b80\u5355\u6837\u4f8b,\u5148\u522b\u590d\u5236\u4fdd\u5b58\u4e3ahtml\u6d4b\u8bd5,\u5728\u4f60\u770b\u5b8c\u4e0a\u9762\u7684\u4ee3\u7801\u540e,\u4f60\u662f\u5426\u4ee5\u4e3a\u5b83\u51fa\u4e3a\u4f60\u5448\u73b0\u5982\u4e0b\u56fe\u7684\u6548\u679c?<\/p>\n<p>\u597d,\u73b0\u5728\u4f60\u53ef\u4ee5\u590d\u5236\u4e0a\u9762\u4ee3\u7801,\u4fdd\u5b58\u5230\u672c\u5730,\u7136\u540e\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00.\u4f60\u4f1a\u60ca\u8bb6\u7684\u53d1\u73b0,\u5b83\u5448\u73b0\u7ed9\u4f60\u7684\u6548\u679c\u662f\u8fd9\u6837\u7684:<\/p>\n<p>\u4e3a\u4ec0\u4e48\u4f1a\u8fd9\u6837\u5462?\u6309CSS\u4e2d,\u5bf9\u4e8e\u6709\u5757\u7ea7\u5b50\u5143\u7d20\u7684\u5143\u7d20\u8ba1\u7b97\u9ad8\u5ea6\u7684\u65b9\u5f0f,\u5982\u679c\u5143\u7d20\u6ca1\u6709\u5782\u76f4\u8fb9\u6846\u548c\u586b\u5145,\u90a3\u5176\u9ad8\u5ea6\u5c31\u662f\u5176\u5b50\u5143\u7d20\u9876\u90e8\u548c\u5e95\u90e8\u8fb9\u6846\u8fb9\u7f18\u4e4b\u95f4\u7684\u8ddd\u79bb.\u6545,\u5b50\u5143\u7d20\u7684\u9876\u90e8\u548c\u5e95\u90e8\u7a7a\u767d\u8fb9\u5c31\u7a81\u51fa\u5230\u5143\u7d20\u7684\u5916\u56f4\u4e86.p\u5143\u7d20\u768415px\u5916\u8fb9\u8ddd\u4e0ediv\u5143\u7d20\u768410px\u7684\u5916\u8fb9\u8ddd\u5f62\u6210\u4e00\u4e2a\u5355\u4e00\u768415px\u5782\u76f4\u7a7a\u767d\u8fb9,\u53e6\u5916,\u5f62\u5f0f\u7684\u8fd9\u4e2a\u7a7a\u767d\u8fb9\u5e76\u975e\u4e3adiv\u6240\u5305\u56f4,\u800c\u662f\u5448\u73b0\u5728div\u7684\u5916\u56f4.\u6240\u4ee5,\u6211\u4eec\u770b\u5230\u4e86\u7b2c\u4e8c\u5f20\u6548\u679c\u56fe.<\/p>\n<p>\u5982\u4f55\u89e3\u51b3?\u672c\u4eba\u6bd4\u8f83\u63a8\u8350\u4e24\u79cd\u89e3\u51b3\u65b9\u5f0f:<\/p>\n<p>\u5176\u4e00,\u4e3a\u5916\u56f4\u5143\u7d20\u5b9a\u4e49\u900f\u660e\u8fb9\u6846.\u5177\u4f53\u5230\u672c\u4f8b,\u5373\u5728\u6837\u5f0fdiv\u4e2d\u52a0\u5165border:1px solid #ddd;<\/p>\n<p>\u5176\u4e8c,\u4e3a\u5916\u56f4\u5143\u7d20\u5b9a\u4e49\u5185\u8fb9\u8ddd\u586b\u5145..\u5177\u4f53\u5230\u672c\u4f8b,\u5373\u5728\u6837\u5f0fdiv\u4e2d\u52a0\u5165padding:1px<\/p>\n<p>\u53e6\u5916,\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5916\u56f4\u5143\u7d20\u7edd\u5bf9\u5b9a\u4f4d,\u6216\u8005\u5b9a\u4e49\u5b50\u5143\u7d20\u6d6e\u52a8\u7b49\u65b9\u5f0f\u5b9e\u73b0.<\/p>\n<p><span style=\"color:#ff0000\">30\uff1a\u7eafcss\u89e3\u51b3\u591a\u884c\u6587\u5b57\u5782\u76f4\u5c45\u4e2d<\/span><\/p>\n<p>&lt;style type=&#8221;text\/css&#8221;&gt;<\/p>\n<p>.alert{<\/p>\n<p>width:400px;<\/p>\n<p>height:250px;<\/p>\n<p>display:table-cell;<\/p>\n<p>vertical-align:middle;<\/p>\n<p>line-height:1.5em;<\/p>\n<p>border:1px solid red;<\/p>\n<p>}<\/p>\n<p>.alert_blank{<\/p>\n<p>height:100%;<\/p>\n<p>width:0;<\/p>\n<p>display:inline;<\/p>\n<p>vertical-align:middle;<\/p>\n<p>zoom:1;<\/p>\n<p>}<\/p>\n<p>.alert_con{<\/p>\n<p>width:100%;<\/p>\n<p>zoom:1;<\/p>\n<p>display:inline;<\/p>\n<p>vertical-align:middle;<\/p>\n<p>}<\/p>\n<p>&lt;\/style&gt;<\/p>\n<p>&lt;div class=&#8221;alert&#8221;&gt;<\/p>\n<p>&lt;div class=&#8221;alert_con&#8221;&gt;\u54e5\u4e43\u591a\u884c\u6587\u5b57\u5782\u76f4\u5c45\u4e2d\uff5e\u54e5\u4e43\u591a\u884c\u6587\u5b57\u5782\u76f4\u5c45\u4e2d\uff5e\u54e5\u4e43\u591a\u884c\u6587\u5b57\u5782\u76f4\u5c45\u4e2d\uff5e\u54e5\u4e43\u591a\u884c\u6587\u5b57\u5782\u76f4\u5c45\u4e2d\uff5e&lt;\/div&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>\u5176\u5927\u6982\u539f\u7406\u4e3a\uff1a\u7b2c\u4e00\u4e2aalert_blank\u5bb9\u5668\uff0cdisplay:inline\u4ee5\u540e\u4f5c\u4e3a\u884c\u5185\u5143\u7d20\uff0c\u5b83\u7684\u9ad8\u5ea6\u4e3a100%\uff0c\u5bbd\u5ea6\u5374\u4e3a0\uff0c\u76f8\u5f53\u4e8e\u7d27\u8d34\u5916\u5c42\u5bb9\u5668\u5de6\u8fb9\u6846\u7684\u4e00\u6761\u900f\u660e\u7684\u7ebf\uff0c\u8fd9\u6837\u5c31\u4f7f\u5f97\u5916\u5c42\u5bb9\u5668\u91cc\u9762\u53ea\u5b58\u5728\u4e00\u884c\u3002\u5916\u5c42\u5bb9\u6613\u7684vertical-align:middle\u4f7f\u5f97\u5176\u5185\u90e8\u76f8\u5f53\u4e8e\u4e00\u884c\u6587\u5b57\u5782\u76f4\u5c45\u4e2d\u3002\u771f\u6b63\u76db\u653e\u5185\u5bb9\u7684div\u4e5f\u662fdisplay:inline\uff0c\u5b83\u5bf9\u5916\u548cblank\u5782\u76f4\u5c45\u4e2d\uff0c\u53ea\u8981\u5185\u90e8\u6587\u5b57\u4e0d\u8d85\u8fc7blank\u7684\u9ad8\u5ea6\uff0c\u8fd9\u4e2a\u6548\u679c\u5c06\u662f\u5b8c\u7f8e\u7684\u3002\u867d\u7136\u4ece\u8bed\u4e49\u5316\u4e0a\u8bb2\uff0c\u7528\u7a7a\u767ddiv\u5e03\u5c40\u8bf4\u4e0d\u592a\u8fc7\u53bb\uff0c\u4f46\u662f\u7455\u4e0d\u63a9\u745c\u3002\u53e6\uff1azoom:1\u662f\u4e3a\u4e86\u89e6\u53d1hasLayout\u3002<\/p>\n<p><span style=\"color:#ff0000\">31:\u5173\u4e8eflash\u906e\u76d6div\u6d6e\u52a8\u5c42<\/span><\/p>\n<p>(a) place Flash embed script in &lt;div&gt; container (I use SWFObject.js)[\u5c06flash\u5d4c\u5165\u811a\u672c\u653e\u5230\u4e00\u4e2adiv\u5bb9\u5668\u4e2d]<\/p>\n<p>(b) add wmode=transparent to Flash embed script[\u589e\u52a0wmode=transparent \u5230flash\u5d4c\u5165\u811a\u672c]<\/p>\n<p>(c) set &lt;div id=&#8221;flashcontent&#8221;&gt; container with z-index:-1; [\u5c06\u5916\u5c42\u5bb9\u5668\u7684z-index\u8bbe\u7f6e\u4e3a-1]<\/p>\n<p>(d) set &lt;body&gt; tag with style .. position:relative;left:0px;top:0px;z-index:0;<\/p>\n<p>(otherwise Firefox does not accept negative z-index)<\/p>\n<p>(e) set floating iframe in container with z-index: 99;[\u5c06\u6d6e\u52a8\u7684iframe\u5728\u5bb9\u5668\u4e2d\u7684zindex\u8bbe\u7f6e\u4e3a99]<\/p>\n<p>(f) use CSS to position flashcontent and htmlcontent containers.[\u4f7f\u7528css\u6765\u8c03\u6574flash\u5bb9\u5668\u548chtml\u5bb9\u5668\u7684\u4f4d\u7f6e]<\/p>\n<p>\u5176\u4ed6\u65b9\u6848\u7f51\u4e0a\u6bd4\u8f83\u591a\u89c1,\u4e0d\u505a\u9610\u8ff0.\u5728\u6b64\u8bf4\u4e0b\u4f7f\u7528\u7b2c\u4e00\u4e2a\u65b9\u6848\u5982\u4f55\u89e3\u51b3:<\/p>\n<p>var so = new SWFObject(&#8220;XXX.swf&#8221;, &#8220;flashId&#8221;, &#8220;\u5bbd\u5ea6&#8221;, &#8220;\u9ad8\u5ea6&#8221;, &#8220;\u7248\u672c&#8221;, &#8220;\u80cc\u666f\u8272&#8221;);<\/p>\n<p>\/\/\u8bbe\u7f6eflash\u4e0d\u906e\u76d6div\u5c42<\/p>\n<p>so.addParam(&#8220;wmode&#8221;, &#8220;opaque&#8221;);<\/p>\n<p>so.write(&#8220;flashcontent&#8221;);<\/p>\n<p>\u5982\u6b64\u8bbe\u7f6e\u5373\u53ef\u8ba9flash\u65e0\u6cd5\u906e\u76d6\u4f4fdiv<\/p>\n<p><span style=\"color:#ff0000\">32:\u5982\u4f55\u5904\u7406ie6\u7684\u6587\u5b57\u884c\u9ad8<\/span><\/p>\n<p>ie6\u4e0b\u6c49\u5b57\u5c31\u4f1a\u663e\u793a\u504f\u4e0a\u4f4d\u7f6e\uff0c\u800c\u5728\u6807\u51c6\u6d4f\u89c8\u5668\u4e2d\u4e0d\u5b58\u5728\u8fd9\u4e2a\u95ee\u9898\u5b57\u4f53 Tahoma,\u8bd5\u4e0b<\/p>\n<p>\u4e0d\u8fc7\u5982\u679c\u6709\u89c4\u5b9a\u7b2c\u4e00\u4e2a\u5b57\u4f53\u662f\u7528\u5565\u7684\uff0c\u90a3\u5c31\u53ea\u80fd\u5ffd\u7565\u8fd9\u4e2a\u95ee\u9898..\u6211\u7ec8\u4e8e\u660e\u767d\u6dd8\u5b9d\u4e3a\u5565\u628aTahoma\u5b57\u4f53\u653e\u5230\u7b2c\u4e00\u4f4d\u4e86<\/p>\n<p>&lt;!DOCTYPE html PUBLIC &#8220;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&#8221; &#8220;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt;<\/p>\n<p>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=utf-8&#8243; \/&gt;<\/p>\n<p>&lt;title&gt;\u6d4b\u8bd5ie6\u7684\u6587\u5b57\u884c\u9ad8\u8868\u73b0&lt;\/title&gt;<\/p>\n<p>&lt;style type=&#8221;text\/css&#8221;&gt;<\/p>\n<p>body,ul,li,p {margin:0;padding:0;}<\/p>\n<p>body { font:12px\/1.5 &nbsp;Tahoma,&#8221;\u5b8b\u4f53&#8221;,Arial, Helvetica, sans-serif; }<\/p>\n<p>ul {float:left;list-style:none; margin-bottom:10px;}<\/p>\n<p>ul li, p { margin-top:4px;background:silver;clear:left;}<\/p>\n<p>ul li {float:left;margin-top:4px;}<\/p>\n<p>&lt;\/style&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;ul&gt;<\/p>\n<p>&lt;li&gt;\u5c81\u6708\u4e0d\u9976\u4eba\u54ea&lt;\/li&gt;<\/p>\n<p>&lt;li&gt;hjgt&lt;\/li&gt;<\/p>\n<p>&lt;\/ul&gt;<\/p>\n<p>&lt;p&gt;\u5c81\u6708\u4e0d\u9976\u4eba\u54ea&lt;\/p&gt;<\/p>\n<p>&lt;p&gt;hjgt&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><span style=\"color:#ff0000\">33:\u5229\u7528 CSS \u8de8\u6d4f\u89c8\u5668\u5730\u9690\u85cf\u6587\u5b57\u4e00\u6cd5<\/span><\/p>\n<p>ont-size:0; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ for firefox &amp; opera<\/p>\n<p>color: transparent; \/\/ for webkit<\/p>\n<p>overflow:hidden; &nbsp; &nbsp;\/\/ for IE<\/p>\n<p>font-size:0;<\/p>\n<p>filter:alpha(opacity=0);<\/p>\n<p>\u81ea\u6d4b\u540e\u517c\u5bb9\u7684\u6d4f\u89c8\u5668\u5982\u4e0b\uff1a<\/p>\n<p>IE 6-8<\/p>\n<p>Firefox 1-4<\/p>\n<p>Opera 9-10<\/p>\n<p>Safari 3-5<\/p>\n<p>Chrome 1-6<\/p>\n<p><span style=\"color:#ff0000\">34:button\u5728chrome\u4e0b\u9ed8\u8ba4\u67092px\u7684margin<\/span><\/p>\n<p>&lt;button&gt;\u5728chrome\u4e0b\u6709\u4e24\u50cf\u7d20margin&lt;\/button&gt;<\/p>\n<p><span style=\"color:#ff0000\">35:ie6\u548cie7\u91cc\u9762margin\u5931\u6548<\/span><\/p>\n<p>&lt;div style=&#8221;padding:20px;background:#f00;&#8221;&gt;<\/p>\n<p>&lt;div style=&#8221;background:#fff;height:200px;margin:50px;&#8221;&gt;\u6211\u7684margin\u5728ie\u91cc\u9762\u5931\u6548\u4e86&lt;\/div&gt;<\/p>\n<p>\u89e3\u51b3\u529e\u6cd5\u53bb\u6389\u91cc\u9762div\u7684\u9ad8\u5ea6<\/p>\n<\/div>\n<p><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>IE6\u3001IE7\u3001IE8 CSS Bug\u517c\u5bb9\u89e3\u51b3\u8bb0\u5f55 IE6\u3001IE7\u3001IE8 CSS Bug\u517c\u5bb9\u89e3\u51b3\u8bb0\u5f55 1\uff1al [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1572","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=1572"}],"version-history":[{"count":0,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/1572\/revisions"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=1572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=1572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=1572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}