css – 插入后面插入的图像:pseudo-element;不能使用跨度

前端之家收集整理的这篇文章主要介绍了css – 插入后面插入的图像:pseudo-element;不能使用跨度前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用tumblr的代码拉入tumblr Feed,并使用after:添加一个图像作为帖子之间的分隔符.我想以图像为中心,但没有运气这样做.因为tumblr生成内容,而不是我,我不认为我可以使用跨标签,这似乎是通常的答案.任何其他想法?

显示正在使用的饲料的页面lumn.net/index.shtml

CSS:

.tumblr_post:after {
    content: url(../img/flower.png);
    display: block;
    position: relative;
    margin-top: 42px;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
}

解决方法

尝试这个:
.tumblr_post:after {
    content: url("../img/flower.png");
    display: block;
    margin: 42px auto 24px;
    position: relative;
    text-align: center;
    width: 100%;
}
原文链接:https://www.f2er.com/css/216506.html

猜你在找的CSS相关文章