[パーツ]引用(blockquote) 吹き出しで表現した引用符(blockquote)デザイン

CSS HTML
 2018.02.10
 2018.03.20

吹き出しで表現した引用符(blockquote)デザイン

誰が言った(書いた)言葉なのかがわかりやすい吹き出しで表現した引用符(blockquote)デザインパートです。
twitterやInstagramなどの引用に使えますね。

browser:  65 11 20 10 
ニャン易度 
There are two means of refuge from the miseries of life: music and cats.

Albert SchweitzerFrench-German theologian

<div class="cp_quote">
<blockquote>
There are two means of refuge from the miseries of life: music and cats.
</blockquote>
<div class="author">
<p>Albert Schweitzer<span>French-German theologian</span></p>
<img src="img.jpg" />
</div>
</div>
*, *:before, *:after {
	font-family: 'FontAwesome';
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
}
.cp_quote {
	position: relative;
	width: 90%;
	margin: 2em auto;
}
/* 引用 */
.cp_quote blockquote {
	position: relative;
	margin: 0;
	padding: 1.5em 2em;
	border-radius: 0.3em;
	background: #FCE4EC;
	box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.3);
}
/* アイコン */
.cp_quote blockquote::before {
	font-size: 2.5em;
	line-height: 0;
	position: absolute;
	top: 0;
	left: 0.3em;
	content: '\f10d';
	color: #e91e63;
	filter: drop-shadow(3px 2px 0px #FCE4EC);
}
/* 吹き出しの▼ */
.cp_quote blockquote::after {
	position: absolute;
	right: 1em;
	bottom: -8px;
	width: 0;
	height: 0;
	content: '';
	border-width: 10px 10px 0 10px;
	border-style: solid;
	border-color: #FCE4EC transparent transparent transparent;
	filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.3));
}
/* 引用元名 */
.cp_quote .author {
	position: relative;
	top: 15px;
	right: 0;
	width: 100%;
	text-align: right;
}
.cp_quote .author img {
	display: inline-block;
	width: 45px;
	height: 45px;
	border: 3px solid #e91e63;
	border-radius: 50%;
	object-fit: cover;
	filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.3));
}
.cp_quote .author p {
	font-size: 0.8em;
	font-weight: bold;
	position: absolute;
	top: -0.8em;
	right: 60px;
	width: calc(100% - 60px - 0.3em);
	padding: 0.3em;
}
.cp_quote .author p span {
	font-size: 0.6em;
	font-weight: normal;
	font-style: italic;
	display: block;
	padding: 0.3em;
	border-top: 2px solid #e91e63;
}

copypet.jp

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

More Info

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