【发布时间】:2017-03-28 19:08:41
【问题描述】:
我正在尝试在图像下方对齐 p 标记。应该很简单,但我已经搞砸了一段时间,一定看不到什么。这是我的代码:
.project {
display: flex;
justify-content: center;
vertical-align: top;
text-align: center;
}
.project1 {
height: 10rem;
width: auto;
border: 5px solid rgba(52, 73, 94, 1);
}
.project1info {
background: rgba(52, 73, 94, 1);
text-align: center;
display: block;
}
<div class="panel">
<h1 class="subHead">Some Projects I Have Worked On</h1>
<h2 class="description"></h2>
</div>
<div class="project">
<a href="https://hidden-brook-12046.herokuapp.com/">
<img class="project1" src="./images/featuring.png" alt="" />
</a>
<p class="project1info">
Featuring allows a user to search a musical artist and view a list of collaboraters they have worked with.
</p>
</div>
【问题讨论】:
标签: html css alignment flexbox