[パーツ]引用(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 cite="http://">
<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: 'FontAwesome';
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
}
.cp_quote {
	position: relative;
	width: 90%;
	margin: 1.2em auto 2em auto;
	border-bottom: 1px solid #da3c41;
	background: #f9f0f0;
	box-shadow: 0 1em 0 #f9f0f0;
}
/* アイコン */
.cp_quote::before {
	font-size: 1.5em;
	position: absolute;
	top: 0.2em;
	right: 50%;
	left: 50%;
	display: flex;
	content: '\f10e';
	color: #da3c41;
	align-items: center;
	justify-content: center;
}
/* 引用 */
.cp_quote blockquote {
	padding: 2em 1em 1em 1em;
	margin: 0;
}
/* ライン */
.cp_quote blockquote::before,
.cp_quote blockquote::after {
	position: absolute;
	top: 10%;
	display: inline-block;
	width: 40%;
	height: 1px;
	content: '';
	background-color: #da3c41;
}
.cp_quote blockquote:before {
	left: 0;
}
.cp_quote blockquote:after {
	right: 0;
}
/* 引用元名 */
.cp_quote blockquote p.author {
	font-size: 0.8em;
	text-align: right;
	color: #da3c41;
}
.cp_quote blockquote p.author::before {
	content: '00';
}

copypet.jp

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

More Info

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