我只是在尝试使用Bootstrap,我不能让偏移起作用,我也不知道为什么。下面是我的代码:
<div class="container">
<div class="row justify-content-between align-items-stretch">
<div class="col-4 offset-2"> ABC </div>
<div class="col-4"> DEF </div>
</div>
</div>
由于某些原因,offset-2根本不移动列。你知道为什么吗?
提前谢谢你,
发布于 2018-08-06 16:27:25
希望这将根据您的要求工作:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="row justify-content-between align-items-stretch">
<div class="col-4 col-md-offset-2">
ABC
</div>
<div class="col-4">
DEF
</div>
</div>
</div>
</body>
</html>
https://stackoverflow.com/questions/51700957
复制相似问题