缺少
我有以下代码:
<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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的问题是 jsfiddle.net 自动包含重置样式表 (
normalize.css
)其中包括:您将在侧边栏中看到一个“标准化 CSS”复选框,取消选中该复选框,
normalize.css
将不会被拉入;例如:那个小提琴只是你的,复选框未选中。
Your problem is that jsfiddle.net automatically includes a reset stylesheet (
normalize.css
) that includes this:You'll see a "Normalized CSS" checkbox in the sidebar, uncheck that and
normalize.css
won't be pulled in; for example:That fiddle is just yours with the checkbox unchecked.
您应该遵循的调试技术是尽可能简化您的代码。要么问题就会消失,要么你只剩下几行小代码,别人就能很容易地发现问题。
我去了你的 JSFiddle 并开始一次删除一行 CSS。那并没有解决问题。然后我开始删除 HTML。最终我得出的结论是:
我的结论是 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:
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.
只需使用下面的代码:
just use this code below: