[パーツ]引用(blockquote) 海外のメッセージカードのような引用符(blockquote)デザイン

CSS HTML
 2018.02.10
 2018.03.20

海外のメッセージカードのような引用符(blockquote)デザイン

海外のメッセージカードのような引用符(blockquote)デザインです。

browser:  65 11 20 10 
ニャン易度 

There are two means of refuge from the miseries of life: music and cats.

Albert Schweitzer

<div class="cp_quote">
<blockquote class="outer">
<div class="inner">
<p>There are two means of refuge from the miseries of life: music and cats.</p>
<p class="author">Albert Schweitzer</p>
</div>
</blockquote>
</div>
*, *:before, *:after {
	font-family: 'FontAwesome';
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
}
.cp_quote {
	position: relative;
	width: 85%;
	margin: 1em auto;
}
/* 枠 */
.cp_quote .outer:before,
.cp_quote .outer:after,
.cp_quote .inner:before,
.cp_quote .inner:after {
	position: absolute;
	width: 80px;
	height: 80px;
	content: '';
	border: 20px solid #faf6e0;
	border-radius: 50%;
	background: transparent;
	-webkit-box-shadow: inset 0 0 0 1px #cccccc;
	        box-shadow: inset 0 0 0 1px #cccccc;
}
.cp_quote .outer:before,.cp_quote .outer:after {
	top: -40px;
}
.cp_quote .inner:before,.cp_quote .inner:after {
	bottom: -60px;
}
.cp_quote .outer:before {
	left: -60px;
	clip: rect(40px, auto, auto, 40px);
}
.cp_quote .outer:after {
	right: -60px;
	clip: rect(40px, 40px, auto, auto);
}
.cp_quote .inner:before {
	left: -40px;
	clip: rect(auto, auto, 40px, 40px);
}
.cp_quote .inner:after {
	right: -40px;
	clip: rect(auto, 40px, 40px, auto);
}
/* 引用 */
.cp_quote blockquote {
	margin: 0;
}
.cp_quote .outer,.cp_quote .inner {
	position: relative;
	display: block;
	border: 1px solid #cccccc;
	background: #faf6e0;
	z-index: 999;
}
.cp_quote .outer {
	padding: 20px 0;
	border-width: 1px 0;
}
.cp_quote .inner {
	margin: 0 -20px;
	padding: 0 3em;
	border-width: 0 1px;
}
.cp_quote .inner p {
	margin: 0 0 0 0;
}
/* 引用元名 */
.cp_quote blockquote p.author {
	margin: 0;
	text-align: right;
}
.cp_quote blockquote p.author::before {
	content: '00';
}

copypet.jp

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

More Info

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