我正在尝试将标题移动到图像下方。
这是我的网站
这是我想要实现的一个例子。
我知道我可以用 h1 标签包装帖子的第一行,但我想知道是否有更优雅的方式。
是的,您可以交换标题和正文条目内容 div 类。您可以通过交换两者的 css 属性而不是更改总内容来以另一种方式做到这一点。
你可以移动header Section
下面的,body entry-content
但如果你只是想用 CSS 来做(这不是一个好主意),但它可以这样做:
只改变这些风格
.collection-type-blog article header
{
width: 100%;
text-align: center;
position: absolute;
bottom: 37px;
}
.collection-type-blog article .post
{
top: -63px;
position: relative;
}
.collection-type-blog article .article-meta
{
top: 63px;
position: relative;
}