缺少
  • 我的无序列表中的圆圈
  • 发布于 2024-11-11 18:39:50 字数 1035 浏览 2 评论 0原文

    我有以下代码:

    <div class="fp1">
        <div class="col">
          <div class="img" id="img1"></div>
                            <ul>
                            <li><span>Test </span></li>
                            <li><span>Test </span></li>        
                            <li><span>Test </span></li>
                            </ul>
          </div>
    </div>
    
    .fp1 .row   { overflow: hidden;  }
    .fp1 .img   { display: inline-block; float: left; width:105px; height:80px; margin:25px 0 10px 0;
        background: yellow; no-repeat scroll 0 0 transparent; }
    
    .fp1 .col   { float: left; width:50%; margin:0px; }
    .fp1 .col ul      { margin:15px 20px 0 0; padding-left: 25px; font-size: 1.2em}
    .fp1 .col ul span { color:#222; font-size: 0.85em; }
    .fp1 .col ul li   { line-height:15px; }
    

    我创建了一个 fiddle

    我不明白的是为什么小圆圈应该左边的“li”好像不见了?

    任何帮助将不胜感激

    I have the following code:

    <div class="fp1">
        <div class="col">
          <div class="img" id="img1"></div>
                            <ul>
                            <li><span>Test </span></li>
                            <li><span>Test </span></li>        
                            <li><span>Test </span></li>
                            </ul>
          </div>
    </div>
    
    .fp1 .row   { overflow: hidden;  }
    .fp1 .img   { display: inline-block; float: left; width:105px; height:80px; margin:25px 0 10px 0;
        background: yellow; no-repeat scroll 0 0 transparent; }
    
    .fp1 .col   { float: left; width:50%; margin:0px; }
    .fp1 .col ul      { margin:15px 20px 0 0; padding-left: 25px; font-size: 1.2em}
    .fp1 .col ul span { color:#222; font-size: 0.85em; }
    .fp1 .col ul li   { line-height:15px; }
    

    I created a fiddle

    What I don't understand is why are the small circles that should appear to the left of the "li" missing?

    Any help would be appreciated

    如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

    扫码二维码加入Web技术交流群

    发布评论

    需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

    评论(3

    木森分化 2024-11-18 18:39:50

    您的问题是 jsfiddle.net 自动包含重置样式表 (normalize.css)其中包括:

    ol,ul {
        list-style:none;
    }
    

    您将在侧边栏中看到一个“标准化 CSS”复选框,取消选中该复选框,normalize.css 将不会被拉入;例如:

    http://jsfiddle.net/ambigously/HQJhe/10/

    那个小提琴只是你的,复选框未选中。

    Your problem is that jsfiddle.net automatically includes a reset stylesheet (normalize.css) that includes this:

    ol,ul {
        list-style:none;
    }
    

    You'll see a "Normalized CSS" checkbox in the sidebar, uncheck that and normalize.css won't be pulled in; for example:

    http://jsfiddle.net/ambiguous/HQJhe/10/

    That fiddle is just yours with the checkbox unchecked.

    提笔落墨 2024-11-18 18:39:50

    您应该遵循的调试技术是尽可能简化您的代码。要么问题就会消失,要么你只剩下几行小代码,别人就能很容易地发现问题。

    我去了你的 JSFiddle 并开始一次删除一行 CSS。那并没有解决问题。然后我开始删除 HTML。最终我得出的结论是:

    <ul><li>Why is there no circle?</li></ul>
    

    我的结论是 JSFiddle 有一些奇怪的样式表应用于您的代码并删除了圆圈。感谢“mu 太短”准确地弄清楚了样式表以及如何将其关闭。但我仍然决定发布这篇文章,因为我认为您可以从学习这种调试技术中受益。

    The debugging technique you should follow here is to simplify your code as much as possible. Either the problem will go away, or you will be left with a few tiny lines of code and someone will be easily able to spot the problem

    I went to your JSFiddle and started removing lines of CSS one at a time. That didn't solve the problem. Then I started removing HTML. Eventually I was down to just this:

    <ul><li>Why is there no circle?</li></ul>
    

    My conclusion is that JSFiddle had some weird stylesheet that was applying to your code and removing the circle. Thank you to "mu is too short" for figuring out exactly what stylesheet and how to turn it off. But I still decided to post this because I think you could benefit from learning this debugging technique.

    清风夜微凉 2024-11-18 18:39:50

    只需使用下面的代码:

    li style="display: list-item; list-style: none"  
    

    just use this code below:

    li style="display: list-item; list-style: none"  
    
    ~没有更多了~
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文