【发布时间】:2015-05-17 18:13:32
【问题描述】:
我在 JSfiddle 中重新创建了它,但仍然无法让它工作。我错过了什么?
这是 HTML
<div class="row">
<div class="6u 12u$(small)"> <span class="image fit"><img src="images/pic01.jpg" alt=""></span>
<h2green class="h2green">HIDE IN PLAIN SIGHT</h2green>
<p>Escape to the big city of your choice; top floor of the tallest skyscraper with a champagne bottle in the bucket filled with ice, this might be just what you need .</p>
</div>
<div class="6u$ 12u$(small)"> <span class="image fit"><img src="images/pic02.jpg" alt=""></span>
<h2blue>ESCAPE TO THE COUNTRYSIDE</h2blue>
<p>You deserve a relaxing break and a quality experience. We strive to make it that way by finding you the right property and making sure you receive the very best of service before and during your stay.</p>
</div>
这是 CSS
h2green {
text-align: center;
font-family: Steelfish;
color: #80c342;
font-size: 3em;
}
h2blue {
text-align: center;
font-family: Steelfish;
color: #0080c6;
font-size: 3em;
}
所有文本总是向左对齐,我需要它居中。
https://jsfiddle.net/m19f35nb/
我只想让所有 H2 和 Ps 居中。
【问题讨论】:
标签: html css center jsfiddle text-align