我如何为此blockquote添加一个收尾报价?

时间:2014-02-26 19:50:47

标签: html css

我很亲密,但需要一些帮助。有没有办法在句子之后但在<cite>

之前添加一个封闭的引用

另外,我如何将整个blockquote置于页面中心?

http://jsfiddle.net/3PTtv/

<blockquote>
   We came back to IBM because our previous provider was not as awesome.
   <cite>Jon Jones, Vice President at Google</cite>
</blockquote>
blockquote {
font-family: Georgia, serif;
font-size: 18px;
font-style: italic;
width: 500px;
margin: 0.25em 0;
padding: 0.25em 40px;
line-height: 1.45;
position: relative;
color: #616161;
}

blockquote:before {
display: block;
content: "\201C";
font-size: 80px;
position: absolute;
left: -20px;
top: -20px;
color: #7a7a7a;
}

blockquote cite {
color: #999999;
font-size: 14px;
display: block;
margin-top: 5px;
}

blockquote cite:before {
content: "\2014 \2009";
}

2 个答案:

答案 0 :(得分:7)

刚刚添加了这些类来关闭引号。

blockquote:after {
    display: block;
    content: "\201D";
    font-size: 80px;
    position: absolute;
    right: 20px;
    top: 40px;
    color: #7a7a7a;
    }
blockquote cite:after {
    content: "\2019 \2009";
    }

这是Demo。 http://jsfiddle.net/kheema/3PTtv/3/

答案 1 :(得分:0)

    blockquote {
        color: #616161;
        font-family: Georgia,serif;
        font-size: 18px;
        font-style: italic;
        line-height: 1.45;
        margin: 0.25em 0;
        padding: 0.25em 40px;
        position: relative;
        quotes: "\201C" "\201D";
        width: 500px;
        margin: 0 auto;
    }
    blockquote:before, blockquote:after {
        color: #7A7A7A;
        display: block;
        font-size: 80px;
        position: absolute;
    }
    blockquote:before {
        content: open-quote;
        left: 0;
        top: -20px;
    }
    blockquote:after {
        content: close-quote;
        bottom: -40px;
        right: 0;
    }

http://jsfiddle.net/nchqL/21/