[装飾系]アニメーション ポイントを目立たせるのに使えるアニメーション

CSS HTML
 2018.10.02

ポイントを目立たせるのに使えるアニメーション

目立たせたいポイントやボタンなどにも使えるパルス系のアニメーションです。

browser:  65 11 20 10 
ニャン易度 
<div class="cp_anime08"></div>
.cp_anime08 {
	line-height: 50px;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	display: block;
	width: 50px;
	height: 50px;
	margin-top: -25px;
	margin-left: -25px;
	cursor: pointer;
	-webkit-animation: anime08_pulse 1.5s infinite;
	        animation: anime08_pulse 1.5s infinite;
	text-align: center;
	color: #ffffff;
	border-radius: 50%;
	background: #e91e63;
	-webkit-box-shadow: 0 0 0 0 rgba(233,30,99 ,0.5);
	        box-shadow: 0 0 0 0 rgba(233,30,99 ,0.5);
}
.cp_anime08:hover {
	-webkit-animation-play-state: paused;
	        animation-play-state: paused;
}
@-webkit-keyframes anime08_pulse {
	0%   { -webkit-transform: scale(0.8);
					       transform: scale(0.8); }
	70%  { -webkit-transform: scale(1);
					       transform: scale(1);
				 -webkit-box-shadow: 0 0 0 50px rgba(233,30,99, 0);
					       box-shadow: 0 0 0 50px rgba(233,30,99, 0); }
	100% { -webkit-transform: scale(0.8);
					        transform: scale(0.8);
				 -webkit-box-shadow: 0 0 0 0 rgba(233,30,99, 0);
					       box-shadow: 0 0 0 0 rgba(233,30,99, 0); }
}
@keyframes anime08_pulse {
	0%   { -webkit-transform: scale(0.8);
					       transform: scale(0.8); }
	70%  { -webkit-transform: scale(1);
					       transform: scale(1);
				 -webkit-box-shadow: 0 0 0 50px rgba(233,30,99, 0);
					       box-shadow: 0 0 0 50px rgba(233,30,99, 0); }
	100% { -webkit-transform: scale(0.8);
					        transform: scale(0.8);
				 -webkit-box-shadow: 0 0 0 0 rgba(233,30,99, 0);
					       box-shadow: 0 0 0 0 rgba(233,30,99, 0); }
}

copypet.jp

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

More Info

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