html – 列表子d在IE7中消失

html – 列表子d在IE7中消失,第1张

概述关于 所以这个问题一次又一次被问到,但我注意到了一些不同的东西;见下文. 标准信息: >子d显示在FF中 > Bullet不会出现在IE中 查找 >在< ul>上设置hasLayout时子d消失了元素,而不是< li&gt ;;这通常在做* {zoom:1}时完成 Internet Explorer中的Firebug UL: backgroundAttachment "scroll" 关于

所以这个问题一次又一次被问到,但我注意到了一些不同的东西;见下文.

标准信息:

>子d显示在FF中
> Bullet不会出现在IE中

查找

>在< ul>上设置hasLayout时子d消失了元素,而不是< li&gt ;;这通常在做* {zoom:1}时完成
Internet Explorer中的FireBUG

ul:

backgroundAttachment       "scroll" backgroundcolor            "transparent" backgroundImage            "none" backgroundRepeat           "repeat" borderBottomcolor          "#000000" borderBottomStyle          "none" borderBottomWIDth          "medium" borderCollapse             "separate" bordercolor                "#000000" borderleftcolor            "#000000" borderleftStyle            "none" borderleftWIDth            "medium" borderRightcolor           "#000000" borderRightStyle           "none" borderRightWIDth           "medium" borderStyle                "none" bordertopcolor             "#000000" bordertopStyle             "none" bordertopWIDth             "medium" borderWIDth                "medium" bottom                     "auto" clear                      "none" color                      "#000000" cursor                     "move" direction                  "ltr" display                    "block" FontFamily                 "tahoma,arial,helvetica,sans-serif" FontSize                   "0.9em" FontStyle                  "normal" fontvariant                "normal" FontWeight                 400 height                     "auto" left                       "auto" letterSpacing              "normal" lineHeight                 "normal" ListStyleImage             "none" ListStyleposition          "outsIDe" ListStyleType              "disc" margin                     "auto auto auto 30pt" marginBottom               "auto" marginleft                 "30pt" marginRight                "auto" margintop                  "auto" maxHeight                  "none" maxWIDth                   "none" minHeight                  "auto" minWIDth                   "auto" overflow                   "visible" padding                    "0px" paddingBottom              "0px" paddingleft                "0px" paddingRight               "0px" paddingtop                 "0px" pageBreakAfter             "auto" pageBreakBefore            "auto" position                   "static" right                      "auto" tableLayout                "auto" textAlign                  "left" textdecoration             "none" textIndent                 "0pt" texttransform              "none" top                        "auto" unicodeBIDi                "normal" verticalAlign              "auto" visibility                 "inherit" whiteSpace                 "normal" wIDth                      "auto" wordSpacing                "normal"

李:

backgroundAttachment       "scroll" backgroundcolor            "transparent" backgroundImage            "none" backgroundRepeat           "repeat" borderBottomcolor          "#000000" borderBottomStyle          "none" borderBottomWIDth          "medium" borderCollapse             "separate" bordercolor                "#000000" borderleftcolor            "#000000" borderleftStyle            "none" borderleftWIDth            "medium" borderRightcolor           "#000000" borderRightStyle           "none" borderRightWIDth           "medium" borderStyle                "none" bordertopcolor             "#000000" bordertopStyle             "none" bordertopWIDth             "medium" borderWIDth                "medium" bottom                     "auto" clear                      "none" color                      "#000000" cursor                     "move" direction                  "ltr" display                    "block" FontFamily                 "tahoma,sans-serif" FontSize                   "0.9em" FontStyle                  "normal" fontvariant                "normal" FontWeight                 400 height                     "auto" left                       "auto" letterSpacing              "normal" lineHeight                 "normal" ListStyleImage             "none" ListStyleposition          "outsIDe" ListStyleType              "disc" margin                     "auto" marginBottom               "auto" marginleft                 "auto" marginRight                "auto" margintop                  "auto" maxHeight                  "none" maxWIDth                   "none" minHeight                  "auto" minWIDth                   "auto" overflow                   "visible" padding                    "0px" paddingBottom              "0px" paddingleft                "0px" paddingRight               "0px" paddingtop                 "0px" pageBreakAfter             "auto" pageBreakBefore            "auto" position                   "static" right                      "auto" tableLayout                "auto" textAlign                  "left" textdecoration             "none" textIndent                 "0pt" texttransform              "none" top                        "auto" unicodeBIDi                "normal" verticalAlign              "auto" visibility                 "inherit" whiteSpace                 "normal" wIDth                      "auto" wordSpacing                "normal"

知道为什么要将布局设置为< ul>修改子d?
我认为它可能是边距/填充,但IE中的FireBUG显示相同的w / | w / o hasLayout.

裸页示例:

<!DOCTYPE HTML PUBliC "-//IETF//DTD HTML//EN">   <HTML>   <head>      <Title>Default</Title>      <style type="text/CSS" media="all">ul {zoom:1;}</style>   </head>   <body>      <ul>         <li>foo</li>         <li>bar</li>         <li>foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar             foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar         </li>      </ul>   </body>   </HTML>

在ie7中尝试上面的w /和缩放:1.
注意:因为这涉及hasLayout其他版本的IE可能会受到影响.

解决方法 我发现:

>设置li {margin-left:1em}就可以了
>在{margin-left:9px},你将开始看到子d右边缘

另一件有趣的事情是,在列表项(< li>)上触发hasLayout会强制子d到文本块的底部.因此,如果您使用* {zoom:1}之类的内容,则需要在顶部垂直对齐li:li {vertical-align:top}

总结

以上是内存溢出为你收集整理的html – 列表子d在IE7中消失全部内容,希望文章能够帮你解决html – 列表子d在IE7中消失所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1132278.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存