[パーツ]引用(blockquote) シンプルな引用符(blockquote)デザイン

CSS HTML
 2018.02.09
 2018.03.20

シンプルな引用符(blockquote)デザイン

使いやすく、パッと見もわかりやすいシンプルな引用符(blockquote)デザインです。

browser:  65 11 20 10 
ニャン易度 
There are two means of refuge from the miseries of life: music and cats.
<div class="cp_quote">
<blockquote cite="" data-author="Albert Schweitzer">
There are two means of refuge from the miseries of life: music and cats.
</blockquote>
</div>
*, *:before, *:after {
	font-family: 'FontAwesome';
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
}
.cp_quote {
	position: relative;
	width: 90%;
	margin: 1em auto;
	border-right: 1px solid #da3c41;
	border-left: 10px solid #da3c41;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
/* アイコン */
.cp_quote::before, .cp_quote::after {
	font-size: 2em;
	position: absolute;
	color: #cccccc;
}
.cp_quote::before {
	top: 0.5em;
	left: 0.3em;
	content: '\f10d';
}
.cp_quote::after {
	right: 0.5em;
	bottom: 0.3em;
	content: '\f10e';
}
/* 引用 */
.cp_quote blockquote {
	padding: 0.5em 1em 4em 1em;
}
/* 引用元名 */
.cp_quote blockquote::after {
	position: absolute;
	right: 4em;
	bottom: 0.5em;
	display: block;
	content: '00' attr(data-author);
}

copypet.jp

CSS3などで新たに追加された要素・装飾方法など、日々コードを書いていないと忘れてしまったり、ささっとプロトタイプを作る時などちょっとしたことに時間をかけている暇はない。そんな時に「あ〜、あれストックしときゃよかったなぁ」って困った自分用のストックブログです。カスタマイズなどがしやすいよう、昨今のweb制作に取り入れられる一般的なコードを中心に掲載しています。

More Info

こんな記事はいかがですか?