css - 为什么我不能在 Wordpress 中正确设置 block 引用的样式?

标签 css wordpress

在我刚刚为我的网站创建的设计中,我使用 css 中的 span 技术使用两个引用图像设置了 block 引用样式:

blockquote {
background-image: url(images/openquote.jpg);
background-repeat: no-repeat;
background-position: left 5px;
padding-left: 30px;
padding-right: 30px;
font-style: italic;
}

blockquote span {
background-image: url(images/closequote.jpg);
background-repeat: no-repeat;
background-position: right bottom;
display: block;
padding-right: 30px;
font-style: italic;
}

然后我像这样格式化 HTML:

<blockquote><span>
"The worst part of writing fiction is the fear of wasting your life behind a keyboard. The idea that, dying, you'll realize that you only ever lived on paper. Your only adventures were make-believe, and while the world fought and kissed, you sat in some dark room, masturbating and making money."<br /><br /><b><div align="right">- Chuck Palahniuk</div></b>
</span></blockquote>

在我创建的测试 HTML 页面上,引述工作正常并且完全符合我的要求。现在,我正在将我的所有编码转移到 Wordpress,但是, block 引用不会以相同的方式显示。

HTML:lifesgarbage.com/rebnation.html(抱歉,我还不能发布多个链接)

WordPress: http://test.lifesgarbage.com

如何更改我的 CSS,使其在 Wordpress 上的显示方式与在常规 HTML 上的显示方式类似?

最佳答案

我认为答案是 wordpress 将 blockquote 标记的默认边距定义为 0。你应该在你的 css 中添加一个明确的边距值。

alt text

关于css - 为什么我不能在 Wordpress 中正确设置 block 引用的样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1730686/

相关文章:

html - 我将如何移动这个 float 的 div?

php - 在 php 文件本身中插入 css 源代码

html - Div元素不会在CSS中换行

html - 表单容器中的对齐问题

html - float :left display border but not center of the page?

css - Wordpress 两列布局帮助。侧边栏和 body 不会高度相同!

html - Bootstrap 居中整个导航栏

CSS Before Selector 和 Margin 问题

php - 通过 readfile() 保护/提供文件,强制下载?

python - 使用 Python-xmlrpc 从外部图像链接设置 WordPress 帖子缩略图