0

I have a bunch of nested quotes I want to display, but I find (see the attached example below) that the spacing between quotes is too small. How do I increase this?

HTML:

<blockquote>stuff
  <blockquote>neato</blockquote>
</blockquote>

CSS:

blockquote {
    border-left: 1.5px solid #ccc;
    color: #888;
    margin: 0 0 10px 0;
    padding: 0 0 0 12px;
}

Here's an interactive example: http://codepen.io/anon/pen/bNKZVo?editors=110

In that example I find the spacing under "neat" and the next quote is too tight and I'd like more room. I tried line-height, but while the spacing between them eventually gets better, (around 50 line height) it makes the second quote of an absurd height.

4

2 回答 2

2

如果您想在嵌套的 bloquote 中添加边距顶部,请执行此操作,在 CSS 中您可以将其表示为:

blockquote blockquote {margin-top:10px}

这样,顶层 bloquote 就没有边距,但所有嵌套的都得到它。

于 2015-03-01T21:45:45.363 回答
0

一个新的 CSS 块怎么样:

blockquote > blockquote {
    margin-top: 20px;
}

这只会影响嵌套引号,而不影响顶级引号。

于 2015-03-01T21:47:33.770 回答