gpt4 book ai didi

html - Bootstrap 弹出窗口 3 列

转载 作者:行者123 更新时间:2023-11-28 17:08:56 25 4
gpt4 key购买 nike

我试图用 Bootstrap 制作一个弹出窗口。我修改了模板中的一些代码。它应该有 3 列。第一列图片,第二列文本和第三列是价格和按钮+图标。这将是一个包含多个相似行的列表。为了简单起见,我在这里只放了一行。页脚将是一些文本。问题是我无法将第 3 列放到正确的位置。我尝试使用 clearfix 等。有什么建议吗?

请注意,这些代码有几个 Unresolved 问题。请忽略那些东西。这不是第一要务。提前致谢。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bootstrap Modals</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#myModal").modal('show');
});
</script>
</head>
<body>
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Wish List</h4>

</div>
<div class="modal-body">

<div class="col-lg-3 col-md-4 col-xs-4 ">
<a class="thumbnail" href="http://www.picturesnew.com/media/images/car-image.jpg" data-image-id="" data-toggle="modal" data-title="The car i dream about" data-caption="something" data-image="http://www.picturesnew.com/media/images/car-image.jpg" data-target="#image-gallery">
<img class="img-responsive" src="http://www.picturesnew.com/media/images/car-image.jpg" alt="A alt text">
</a>
</div>
<div "col-lg-3 col-md-4 col-xs-4 clearfix">

<p ><a href="#">Product Title</a></p>
<p class="text-warning"><small>Description.dfdasfjsadfdasldfdslafjlsadfsldfjsdljf</small></p>
</div>
<div class="col-lg-3 col-md-4 col-xs-4 clearfix" >
<p>price$6.99</p>
<button type="button" class="btn btn-danger" data-dismiss="modal">Buy now</button>
<span class="glyphicon glyphicon-trash"></span>
</div>

</div>
<div class="modal-footer">
<span> view of 1-5 of </span>
<select>
<option value="5">5</option>
<option value="5">10</option>

</select>
</div>
</div>
</div>
</div>
</body>
</html>

最佳答案

你必须添加一个 'row' ,而忘记了一个 'class=' ,你可以删除 clearfix

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bootstrap Modals</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#myModal").modal('show');
});
</script>
</head>
<body>
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Wish List</h4>

</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-3 col-md-4 col-xs-4 ">
<a class="thumbnail" href="http://www.picturesnew.com/media/images/car-image.jpg" data-image-id="" data-toggle="modal" data-title="The car i dream about" data-caption="something" data-image="http://www.picturesnew.com/media/images/car-image.jpg" data-target="#image-gallery">
<img class="img-responsive" src="http://www.picturesnew.com/media/images/car-image.jpg" alt="A alt text">
</a>
</div>
<div class="col-lg-3 col-md-4 col-xs-4 clearfix">

<p ><a href="#">Product Title</a></p>
<p class="text-warning"><small>Description.dfdasf jsadfdasld fdslafjlsadf sldfjsdljf</small></p>
</div>
<div class="col-lg-3 col-md-4 col-xs-4 clearfix" >
<p>price$6.99</p>
<button type="button" class="btn btn-danger" data-dismiss="modal">Buy now</button>
<span class="glyphicon glyphicon-trash"></span>
</div>

</div>
</div>
<div class="modal-footer">
<span> view of 1-5 of </span>
<select>
<option value="5">5</option>
<option value="5">10</option>

</select>
</div>
</div>
</div>
</div>
</body>
</html>

关于html - Bootstrap 弹出窗口 3 列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29655931/

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