gpt4 book ai didi

javascript - 如何将 LG 屏幕的列表显示为 3 列,SM 屏幕的列表显示为 1 列

转载 作者:行者123 更新时间:2023-12-01 00:13:36 30 4
gpt4 key购买 nike

在计算机上,我的列表如下所示: enter image description here

但在手机上,它仅显示第一列,并且不会将列表继续为 1 列列表。

我正在使用 Bootstrap,我的代码如下所示:

 <section>
<div class="container">
<div class="row align-items-start">
<div class="col-sm-12 col-md-4">
<div class="p-3">

<b>Statewide Texas Sites</b><br />
<a href="https://www.touringtexas.com/" target="_top">Touring Texas</a>
<br />
<a href="https://www.texas-lakes.net/" target="_top">Texas Lakes</a>
<br />

</div>
</div>

<div class="col-sm-12 col-md-4 col-md-push-4">
<div class="p-3">

<b>Texas Tourist Areas</b><br />
<a href="https://www.highlandlakes.com/" target="_top">Highland Lakes</a>
<br />
<a href="https://www.hill-country.net/" target="_top">Hill Country Network</a>
<br />

</div>
</div>


<div class="col-sm-12 col-md-4 col-md-push-4">
<div class="p-3">

<b>Texas Lakes</b><br />
<a href="https://www.highlandlakes.net/lakeaustin/" target="_top">Lake Austin</a>
<br />
<a href="https://www.lake-bridgeport.com/" target="_top">Lake Bridgeport</a>
<br />

</div>
</div>
</div>
</div>
</section>

最佳答案

它应该工作正常,看起来你的设置有问题,首先我认为是视口(viewport),检查你是否有 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">在你的脑海里。

查看在移动设备和桌面上运行的示例。

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="/docs/4.1/assets/img/favicons/favicon.ico">

<title>Sticky Footer Template for Bootstrap</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<body>
<section>
<div class="container">
<div class="row align-items-start">
<div class="col-sm-12 col-md-4">
<div class="p-3">

<b>Statewide Texas Sites</b><br />
<a href="https://www.touringtexas.com/" target="_top">Touring Texas</a>
<br />
<a href="https://www.texas-lakes.net/" target="_top">Texas Lakes</a>
<br />

</div>
</div>

<div class="col-sm-12 col-md-4 col-md-push-4">
<div class="p-3">

<b>Texas Tourist Areas</b><br />
<a href="https://www.highlandlakes.com/" target="_top">Highland Lakes</a>
<br />
<a href="https://www.hill-country.net/" target="_top">Hill Country Network</a>
<br />

</div>
</div>


<div class="col-sm-12 col-md-4 col-md-push-4">
<div class="p-3">

<b>Texas Lakes</b><br />
<a href="https://www.highlandlakes.net/lakeaustin/" target="_top">Lake Austin</a>
<br />
<a href="https://www.lake-bridgeport.com/" target="_top">Lake Bridgeport</a>
<br />

</div>
</div>
</div>
</div>
</section>

</body>
</html>

关于javascript - 如何将 LG 屏幕的列表显示为 3 列,SM 屏幕的列表显示为 1 列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59920652/

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