【发布时间】:2014-03-07 10:26:37
【问题描述】:
如何使此样式元素内部的文本与左下角对齐? 我只希望框内的文本位于框的左下角。文本的其余部分应该不受影响。
我是CSS 的新手,无法弄清楚。
HTML
<body>
<h1>example text</h1>
<article class="box" style="background-color: #2672EC">foo bar</article>
<h1>example text</h1>
</body>
CSS
body {
font-family: Verdana;
font-size: 16px;
color: black;
}
.box {
height: 187px;
width: 187px;
margin-right: 5.5px;
margin-left: 5.5px;
margin-bottom: 5.5px;
margin-top: 5.5px;
color: white;
}
这里是 JSFiddle
【问题讨论】:
标签: html css text-alignment