[パーツ]記事一覧などに使うニュースカード 日付がアクセントになったニュースカード

CSS HTML
 2018.06.26

日付がアクセントになったニュースカード

日付がアクセントになったニュースカードです。

browser:  65 11 20 10 
ニャン易度 
21
Jun
カテゴリー

記事タイトル

サブタイトルやキャッチコピーなど

吾輩は猫である。名前はまだ無い。どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している...

10 mins ago 20 comments
<div class="cp_card07">
	<div class="photo">
		<div class="details">
			<div class="day">21</div>
			<div class="month">Jun</div>
		</div>
		<img src="image.jpg"/>
	</div>
	<div class="description">
		<div class="category">カテゴリー</div>
		<h1><a href="#">記事タイトル</a></h1>
		<h2>サブタイトルやキャッチコピーなど</h2>
		<p class="text">吾輩は猫である。名前はまだ無い。どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している...</p>
		<div class="meta"><span class="timestamp"><i class="fa fa-clock-o"></i> 10 mins ago</span><span class="comments"><i class="fa fa-comments"></i><a href="#"> 20 comments</a></span></div>
	</div>
</div>
.cp_card07 {
	position: relative;
	z-index: 1;
	display: block;
	min-width: 270px;
	-webkit-transition: all 0.3s linear 0s;
	        transition: all 0.3s linear 0s;
	border-radius: 3px;
	background: #ffffff;
	-webkit-box-shadow: 0 3px 7px -3px rgba(0, 0, 0, 0.3);
	        box-shadow: 0 3px 7px -3px rgba(0, 0, 0, 0.3);
}
.cp_card07:hover .photo img {
	-webkit-transform: scale(1.1);
	        transform: scale(1.1);
	opacity: 0.6;
}
.cp_card07 .photo {
	overflow: hidden;
	height: 360px;
	border-radius: 3px 3px 0 0;
	background: #000000;
}
.cp_card07 .photo .details {
	font-weight: 700;
	position: absolute;
	z-index: 1;
	top: -20px;
	right: -20px;
	width: 75px;
	height: 75px;
	padding: 14.5px 0;
	text-align: center;
	color: #ffffff;
	border-radius: 100%;
	background: #e74c3c;
}
.cp_card07 .photo .details .day {
	font-size: 18px;
}
.cp_card07 .photo .details .month {
	font-size: 12px;
	text-transform: uppercase;
}
.cp_card07 .photo img {
	display: block;
	width: 120%;
	-webkit-transition: all 0.3s linear 0s;
	        transition: all 0.3s linear 0s;
}
.cp_card07 .description {
	position: absolute;
	bottom: 0;
	width: 100%;
	padding: 1em;
	-webkit-transition: all 0.3s cubic-bezier(0.37, 0.75, 0.61, 1.05) 0s;
	        transition: all 0.3s cubic-bezier(0.37, 0.75, 0.61, 1.05) 0s;
	background: #ffffff;
}
.cp_card07 .description .category {
	position: absolute;
	top: -34px;
	left: 10px;
	padding: 5px 15px;
	height: 34px;
	text-transform: uppercase;
	color: #ffffff;
	border-radius: 3px 3px 0 0;
	background: #e74c3c;
}
.cp_card07 .description h1 {
	font-size: 1.4em;
	margin: 0;
	padding: 0 0 0.1em;
	color: #333333;
}
.cp_card07 .description h1 a {
	text-decoration: none;
	color: #333333;
}
.cp_card07 .description h2 {
	font-size: 16px;
	margin: 0;
	padding: 0 0 5px;
	color: #e74c3c;
}
.cp_card07 .description .text {
	font-size: 14px;
	line-height: 1.8em;
	height: 0;
	opacity: 0;
	color: #666666;
	margin: 0;
}
.cp_card07 .description .meta {
	margin: 0px 0 0;
	color: #999999;
}
.cp_card07 .description .meta .timestamp {
	margin: 0 16px 0 0;
}
.cp_card07 .description .meta a {
	text-decoration: none;
	color: #999999;
}
.cp_card07:hover .description .text {
	height: auto;
	opacity: 1;
}

copypet.jp

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

More Info

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