我有以下代码:
<html>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<head></head>
<style>
.outerCss{
background-color:#f2f2f2;
border-radius:5px;
margin-left: inherit;
}
h1{
text-align:center;
font-family:Monospace;
}
h3{
text-align:center;
}
.imageOption{
margin: 0 auto;
}
#innerContainer{
background-color:antiquewhite;
border-radius:5px;
}
.dates{
width: 50%;
margin: 0 auto;
}
figcaption{
float: inherit;
}
</style>
<body>
<div class="container">
<div class="container" id="innerContainer">
<h1>Dr.Norman Borlaug</h1>
<h3><i>The man who saved a billion lives</i></h3>
<div class="row">
<figure>
<img class="imageOption center-block" src="https://c2.staticflickr.com/4/3689/10613180113_fdf7bcd316_b.jpg">
<figcaption>Dr. Norman Borlaug, second from left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.</figcaption>
</figure>
</div>
<h3>Here's a time line of Dr. Borlaugs's life:</h3>
</body>
</html>
问题在于,我将图像置于中心但不能移动figcaption
,以便从图像开始的点开始。对不起,如果这是一个愚蠢的问题,刚开始学习它们并且不知道如何寻找答案,我对术语并不熟悉。