【问题标题】:Blockquote not aligning块引用未对齐
【发布时间】:2016-02-22 14:53:00
【问题描述】:

我正在设计一个响应式网站,这意味着布局会发生变化。当尽可能宽地查看时,我的块引用换行到下一行。我希望它在同一行。

我已经设法通过添加一些 text-indent 来修复未打开的引用,但是我无法移动关闭的引用。

我的 HTML:

<blockquote><p class="blockQuote">In recent years we have noticed a growth in demand for audit services, by enterprises with foreign investment, partly because of the demands on the part of organizations such as the CPI and the central bank.</p></blockquote>

CSS:

blockquote  {
    font-family: serif;
    font-style: italic;
    color: #000;
    margin: 0px 0px 10px 0px;
}

blockquote:before   {
    content: "\201C";

}

blockquote:after    {
    content: "\201D";

blockquote:before   {
        position: absolute;
        width: 60px;
        height: 60px;
        line-height: 1;
        font-size: 120px;
    }

    blockquote:after    {
        position: absolute;
        width: 60px;
        height: 60px;
        line-height: 1;
        font-size: 120px;
    }

当我使用 span 元素时,关闭引号会修复,但打开引号看起来应该进一步向上移动。

【问题讨论】:

    标签: blockquote


    【解决方案1】:

    添加&lt;span&gt; 标签而不是&lt;p&gt; 标签。在这里工作 JSFiddle https://jsfiddle.net/jfmf4ujc/

    【讨论】:

    • 我使用了 span 元素,它修复了关闭引号,但打开的引号已经不对齐。我该如何解决? (在原帖中添加了图片)
    • 除了问题中发布的css之外,您是否添加了任何额外的css?对我来说,使用 span 元素效果很好。如果您使用了任何额外的 CSS,请将其添加到问题中。这样我就可以看看了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-09
    • 2016-11-22
    相关资源
    最近更新 更多