为什么当 fieldset 内的 div 向左浮动时,它实际上向右浮动?
这是 html:
<fieldset>
<div>
</div>
</fieldset>
这是 css:
fieldset
{
float: left;
width: 200px;
}
fieldset > div
{
float: left;
width: 100px;
}
由于某种原因,div 似乎向右浮动,为什么呢?
here is the html:
<fieldset>
<div>
</div>
</fieldset>
here is the css:
fieldset
{
float: left;
width: 200px;
}
fieldset > div
{
float: left;
width: 100px;
}
and for some reason the div appears to be floating right, why is that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它实际上对我来说效果很好。它向左浮动,而不是向右浮动。
这是我尝试过的事情,
Index.html
和index1.css
以及字段集位于左侧。
看看这里:浮动 div 到字段集中的左侧
It actually works fine with me. It floats to the left, instead to the right.
Here's something that I tried,
Index.html
and index1.css
and the fieldset is on the left.
Have a look here : Floating div to left inside the fieldset