gpt4 book ai didi

html - Bootstrap 的行和列

转载 作者:行者123 更新时间:2023-11-28 07:26:40 25 4
gpt4 key购买 nike

我正在尝试创建此网页: https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/index.html

该部分的前两部分工作正常,在图片旁边显示图像。但是该部分的第三部分不显示任何内容。我的两个 div 的结束标记显示为白色而不是红色。

<!doctype html>
<html>
<head>
<link rel="stylesheet" href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>

<div class="main">
<div class="container">
<h2>Heading</h2>
<p>Paragraph Text</p>
<a class="btn" href="#">Download Shutterbug</a>

</div>
</div>

<div class="section">
<div class="container">
<div class="row">
<div class="col-md-6">
<img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/share.png">
</div>
<div class="col-md-6">
<h2>Heading</h2>
<p>Paragraph</p>
</div>
</div>

<div class="row">
<div class="col-md-6">
<img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/explore.png">
</div>
<div class="col-md-6">
<h2>Heading</h2>
<p> Text Text Text Text Text </p>
</div>
</div>

<div class="row">
<div class="col-md-6">
<img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/save.png">
</div>
<div class="col-md-6">
<h2>Heading<h3>
<p>Text Text Text</p>
</div>
</div>
</div>
</div>
</div>

最佳答案

您有不需要的关闭 div。

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="section">
<div class="container">
<div class="row">
<div class="col-md-6">
<img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/share.png">
</div>
<div class="col-md-6">
<h2>Heading</h2>
<p>Paragraph</p>
</div>
</div>

<div class="row">
<div class="col-md-6">
<img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/explore.png">
</div>
<div class="col-md-6">
<h2>Heading</h2>
<p>Text Text Text Text Text</p>
</div>
</div>

<div class="row">
<div class="col-md-6">
<img src="https://s3.amazonaws.com/codecademy-content/projects/shutterbugg/save.png">
</div>
<div class="col-md-6">
<h2>Heading<h3>
<p>Text Text Text</p>
<div>
</div>

关于html - Bootstrap 的行和列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31770964/

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