blockquoteでの引用を美しく表示するCSSサンプル
2006年11月27日
スポンサード リンク
Natalie Downe Blog Archive Inline image quotes
I have been meaning to write about this technique for some time now. The aim is a block quote looking something like this, with speech marks at the front and termination of the text but without the nastiness of inline images.
blockquoteでの引用を美しく表示するCSS。
次のようなシンプルなblockquoteのHTMLがあったとします。
<blockquote cite="Brian Littrell"><p>Shoot for the moon. Even if you miss, you'll land among the stars.</p></blockquote>
サンプルで示されているCSSを使うことで次のように表示されます。
画像を2枚使っていて、CSSは次のようになっています。
blockquote {
blockquote p {
text-indent: 25px;
background: url(quotes1.png);
background-position: 0 2px;
background-repeat: no-repeat;
}
display: inline;
margin: 0;
padding-right: 24px;
background: url(quotes2.png);
background-position: bottom right;
background-repeat: no-repeat;
}
画像とCSSをちょこっと変更することで、よりオシャレな引用部分を作れるでしょう:-)
関連エントリ
スポンサード リンク
投稿者 KJ : 2006年11月27日 14:04
|
間違いの指摘をしていただける方はメールでお願いします
最新のブログ記事
- 感性を刺激してくれそうなタイポグラフィ一杯「WE LOVE TYPOGRAPHY」
- 感性を刺激してくれそうなタイポグラフィ一杯「WE LOVE TYPOGRAPHY」
- アーティスト気分のポートフォリオサイトが構築できる「MyProFolio」
- クールな感じを演出できそうな色々な形状のPhotoshopブラシ集
- PHPからTwitterに投稿するサンプルコード&サンプルアプリ
- 2009年4月16日 管理人のブックマーク
- iPhone上で動くデジタル時計作成チュートリアル
- 利用者に対し非常に分かりやすい通知を行うためのJavaScriptライブラリ「Notimoo」
- 見る人に強烈な印象を与える芸術的なWordPressテーマ集
- 2009年4月15日 管理人のブックマーク
- 有用なPDF資料を検索できる「PDF Books Search Engine」