[パーツ]引用(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="card">
<p>There are two means of refuge from the miseries of life: music and cats.</p>
<p class="author">Albert Schweitzer</p>
</blockquote>
</div>
*, *:before, *:after {
	font-family: Georgia, serif;
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
}
.cp_quote {
	position: relative;
	width: 90%;
	margin: 2em auto;
}
.cp_quote blockquote {
	position: relative;
	z-index: 1;
	overflow: hidden;
	margin: 0;
	padding: 2em 2em 2em 50px;
	color: #222222;
	background: #ffffff;
	box-shadow: 0 2px 4px rgba(34, 34, 34, 0.12);
}
.cp_quote blockquote:before {
	font-size: 5em;
	font-weight: normal;
	position: absolute;
	top: 10px;
	left: 10px;
	content: '“';
	color: rgba(238, 238, 238, 0.8);
}
.cp_quote blockquote:after {
	font-size: 25em;
	font-weight: normal;
	line-height: 100px;
	position: absolute;
	z-index: -1;
	top: 110%;
	right: -32px;
	display: inline-block;
	width: 160px;
	height: 100px;
	line-height: 100px;
	content: '”';
	color: rgba(238, 238, 238, 0.8);
}
.cp_quote blockquote p {
	line-height: 1.5;
	max-width: 80%;
	margin: 0;
}
.cp_quote blockquote.card {
	color: #222222;
	background: #00bcd4;
	box-shadow: 0 1px 2px rgba(34, 34, 34, 0.12), 0 2px 4px rgba(34, 34, 34, 0.24);
}
.cp_quote blockquote.card:before, .cp_quote blockquote.card:after {
	color: #80deea;
}
/* 引用元名 */
.cp_quote blockquote p.author {
	margin: 0;
	text-align: right;
}
.cp_quote blockquote p.author::before {
	content: '00';
}

copypet.jp

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

More Info

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