我有一个页面,其中行分为两列。在移动视图中,我想先显示第2列,然后显示第2列。
答案 0 :(得分:0)
您是否正在寻找类似的东西?如果是,您可以使用order-sm-**
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 order-sm-12">column 2</div>
<div class="col-sm-6 order-sm-1">column 1</div>
</div>
</div>
</body>
</html>