【发布时间】:2018-03-13 18:30:32
【问题描述】:
请看下面的片段图片
我创建了一个包含 position:fixed; 的 div,并注意到左侧有一个空白区域被 position 15 占用,我第一次看到它。如何修复它。
如何将position改为0。
<div class="nav-color" style="position:fixed; z-index: 5; bottom: 0; padding: 10px; background-color: blue; " class="col-md-12">
<input type="text" class="form-control col-md-6" placeholder="Type Here" style="margin-right: 10px;" />
<span class="input-group-btn col-md-6">
<button class="btn btn-default " type="button" style=" margin-left: 10px;margin-right: 10px;">Add</button>
<button class="btn btn-warning " style="color: white;">Logout</button>
</span>
</div>
【问题讨论】:
-
您需要在此处发布您的标记示例:minimal reproducible example
-
感谢回复,我通过添加
left:0;right:0;解决了这个问题 -
您需要将其写成您问题的答案,而不仅仅是发表评论。