[パーツ]引用(blockquote) 引用先の写真を使った引用符(blockquote)デザインパート2

CSS HTML
 2018.02.10
 2018.03.20

引用先の写真を使った引用符(blockquote)デザインパート2

引用先の写真を使った引用符(blockquote)デザインパート2です。
twitterの引用などに使えますね。

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

Albert SchweitzerFrench-German theologian

<figure class="cp_quote">
<blockquote>There are two means of refuge from the miseries of life: music and cats.</blockquote>
<div class="author">
<img src="img.jpg" />
<h5>Albert Schweitzer<span>French-German theologian</span></h5>
</div>
</figure>
*, *:before, *:after {
	font-family: 'FontAwesome';
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
}
.cp_quote {
	position: relative;
	overflow: hidden;
	width: 90%;
	margin: 1em auto;
	color: #ffffff;
}
/* 写真 */
.cp_quote img {
	position: absolute;
	z-index: 1;
	right: 60%;
	display: block;
	width: 80px;
	max-width: 100%;
	height: 80px;
	margin-right: 5px;
	border-radius: 50%;
	object-fit: cover;
}
/* 引用 */
.cp_quote blockquote {
	line-height: 1.6em;
	position: relative;
	display: block;
	margin: 0 0 -40px 0;
	padding: 30px 50px 65px 50px;
	border-radius: 8px;
	background-color: #607d8b;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
/* アイコン */
.cp_quote blockquote:before,
.cp_quote blockquote:after {
	font-size: 50px;
	font-style: normal;
	position: absolute;
	content: '1C';
	opacity: 0.3;
}
.cp_quote blockquote:before {
	top: 35px;
	left: 20px;
}
.cp_quote blockquote:after {
	right: 20px;
	bottom: 35px;
	content: '1D';
}
/* 引用元名 */
.cp_quote .author {
	position: relative;
	display: block;
	height: 80px;
	margin: 0;
	padding: 0 35px;
	text-align: left;
	color: #ffffff;
}
.cp_quote .author h5,
.cp_quote .author span {
	position: absolute;
	left: 40%;
	padding: 3px 5px 0px 5px;
	opacity: 0.8;
}
.cp_quote .author h5 {
	font-weight: bold;
	bottom: 50%;
	margin: 0;
	color: #000000;
}
.cp_quote .author span {
	font-size: 0.6em;
	top: 100%;
	left: 0;
	white-space: nowrap;
	color: #607d8b;
}

copypet.jp

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

More Info

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