[装飾系]アニメーション よく見るマップにピンがシュパッと刺さるアニメーション

CSS HTML
 2018.10.02

マップにピンがシュパッと刺さるアニメーション

よく見るマップにピンがシュパッと刺さるアニメーションです。

browser:  65 11 20 10 
ニャン易度 
<div class="cp_anime11">
	<div class="cp_pin"></div>
	<div class="cp_pulse"></div>
</div>
.cp_anime11 {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 50px;
	margin: -25px 0 0 -12px;
}
.cp_anime11 .cp_pin {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 50%;
	width: 30px;
	height: 30px;
	margin: -20px 0 0 -20px;
	-webkit-transform: rotate(-45deg);
	        transform: rotate(-45deg);
	-webkit-animation: anime11_bounce 1s;
	        animation: anime11_bounce 1s;
	border-radius: 50% 50% 50% 0;
	background: #64B5F6;
}
.cp_anime11 .cp_pin:after {
	position: absolute;
	left: 50%;
	right: 50%;
	width: 14px;
	height: 14px;
	margin: 8px 0 0 -7px;
	content: '';
	border-radius: 50%;
	background: #1565C0;
}
.cp_anime11 .cp_pulse {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	margin: 11px 0px 0px -12px;
	-webkit-transform: rotateX(55deg);
	        transform: rotateX(55deg);
	border-radius: 50%;
	background: rgba(233,30,99 ,0.7);
}
.cp_anime11 .cp_pulse:after {
	position: absolute;
	width: 40px;
	height: 40px;
	margin: -13px 0 0 -19px;
	content: '';
	-webkit-animation: anime11_pulsate 1s ease-out infinite 1.1s;
	        animation: anime11_pulsate 1s ease-out infinite 1.1s;
	opacity: 0;
	border-radius: 50%;
	-webkit-box-shadow: 0 0 1px 2px rgba(236,64,122 ,0.3);
	        box-shadow: 0 0 1px 2px rgba(236,64,122 ,0.3);
}
@-webkit-keyframes anime11_pulsate {
	0%   { -webkit-transform: scale(0.1, 0.1);
				         transform: scale(0.1, 0.1);
				 opacity: 0; }
	50%  { opacity: 1; }
	100% { -webkit-transform: scale(1.2, 1.2);
				         transform: scale(1.2, 1.2);
				 opacity: 0; }
}
@keyframes anime11_pulsate {
	0%   { -webkit-transform: scale(0.1, 0.1);
				         transform: scale(0.1, 0.1);
				 opacity: 0; }
	50%  { opacity: 1; }
	100% { -webkit-transform: scale(1.2, 1.2);
				         transform: scale(1.2, 1.2);
				 opacity: 0; }
}
@-webkit-keyframes anime11_bounce {
	0%   { -webkit-transform: translateY(-2000px) rotate(-45deg);
				         transform: translateY(-2000px) rotate(-45deg);
				 opacity: 0; }
	60%  { -webkit-transform: translateY(30px) rotate(-45deg);
				         transform: translateY(30px) rotate(-45deg);
				 opacity: 1; }
	80%  { -webkit-transform: translateY(-10px) rotate(-45deg);
				         transform: translateY(-10px) rotate(-45deg); }
	100% { -webkit-transform: translateY(0) rotate(-45deg);
				         transform: translateY(0) rotate(-45deg); }
}
@keyframes anime11_bounce {
	0%   { -webkit-transform: translateY(-2000px) rotate(-45deg);
				         transform: translateY(-2000px) rotate(-45deg);
				 opacity: 0; }
	60%  { -webkit-transform: translateY(30px) rotate(-45deg);
				         transform: translateY(30px) rotate(-45deg);
				 opacity: 1; }
	80%  { -webkit-transform: translateY(-10px) rotate(-45deg);
				         transform: translateY(-10px) rotate(-45deg); }
	100% { -webkit-transform: translateY(0) rotate(-45deg);
				         transform: translateY(0) rotate(-45deg); }
}

copypet.jp

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

More Info

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