gpt4 book ai didi

css - 在移动设备中重新排序列

转载 作者:行者123 更新时间:2023-11-28 16:57:21 25 4
gpt4 key购买 nike

我尝试使用 boostrap 3 创建布局,我想像这样重新排序 div 列:

从桌面列顺序(文本 - 图像,图像 - 文本):

[文本] [图像]

[图像] [文本]

[文本] [图像]

[图像] [文本]

到移动列顺序(图像文本):

[图像]

[文本]

[图像]

[文本]

[图像]

[文本]

[图像]

这是我的脚本:

<div class="row align-items-center">
<div class="col-lg-6">
<div class="about-content">
<h1>Our Story</h1>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="img/banner/new2.png" alt="">
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="img/banner/icon.png" alt="">
</div>
</div>
<div class="col-lg-6">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-lg-6">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="img/banner/icon2.png" alt="">
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="img/banner/icon1.png" alt="">
</div>
</div>
<div class="col-lg-6">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-lg-5">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="img/banner/4.png" alt="">
</div>
</div>
</div>

最佳答案

请试试这个代码:

<!DOCTYPE html>
<html>
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>

<style>
@media (max-width: 991px) {
.column-reverse {
display: flex;
flex-direction: column-reverse;
}
}
</style>
</head>
<body>
<div class="container">
<div class="row align-items-center column-reverse">
<div class="col-lg-6">
<div class="about-content">
<h1>Our Story</h1>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="http://qnimate.com/wp-content/uploads/2014/03/images2.jpg" class="img-responsive" alt="">
</div>
</div>
</div>

<div class="row align-items-center">
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="http://qnimate.com/wp-content/uploads/2014/03/images2.jpg" class="img-responsive" alt="">
</div>
</div>
<div class="col-lg-6">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
</div>

<div class="row align-items-center column-reverse">
<div class="col-lg-6">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="http://qnimate.com/wp-content/uploads/2014/03/images2.jpg" class="img-responsive" alt="">
</div>
</div>
</div>

<div class="row align-items-center">
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="http://qnimate.com/wp-content/uploads/2014/03/images2.jpg" class="img-responsive" alt="">
</div>
</div>
<div class="col-lg-6">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
</div>

<div class="row align-items-center column-reverse">
<div class="col-lg-5">
<div class="about-content">
<h3>Our Story</h3>
<p>Void gathering midst together you're shall. Beast set he <br>likeness spirit winged two all fourth they're gathered<br> seasons very may heaven saying. Fly image th</p>
</div>
</div>
<div class="col-md-6 col-lg-6 mb-4 mb-lg-4">
<div class="about-img">
<img src="http://qnimate.com/wp-content/uploads/2014/03/images2.jpg" class="img-responsive" alt="">
</div>
</div>
</div>
</div>
</body>
</html>

关于css - 在移动设备中重新排序列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55841752/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com