
Fly Eye with CSS Animasi @Keyframes

Seperti yang pernah dituliskan sebelumnya, pembuatan animasi melalui penerapan @Keyframes
bisa Anda modifikasi berbagai arah, kekanan, kekiri, keatas, dan kebawah bahkan berputar sesuai dengan yang diinginkan oleh Anda. Contoh jelas yang Admin terapkan dalam blog ini pembuatan Fly Eye hanya menggunakan CSS @Keyframes yang di eksperimen berbagai arah.
Sebelum Anda mencobanya silakan kunjungi dulu halaman /2012/06/belajar-css-animasi-keyframes.html ini untuk lebih jelasnya.
Beda dengan sebelumnya, sample yang Admin berika ini sudah menggunakan efek :hover
ketika disentuh oleh mouse.
1code-line:1-12code-line:1-23code-line:1-34code-line:1-45code-line:1-56code-line:1-67code-line:1-78code-line:1-89code-line:1-910code-line:1-1011code-line:1-1112code-line:1-1213code-line:1-1314code-line:1-1415code-line:1-1516code-line:1-1617code-line:1-1718code-line:1-1819code-line:1-1920code-line:1-2021code-line:1-2122code-line:1-2223code-line:1-2324code-line:1-2425code-line:1-2526code-line:1-2627code-line:1-2728code-line:1-2829code-line:1-2930code-line:1-3031code-line:1-3132code-line:1-3233code-line:1-3334code-line:1-3435code-line:1-3536code-line:1-3637code-line:1-3738code-line:1-3839code-line:1-3940code-line:1-4041code-line:1-4142code-line:1-4243code-line:1-4344code-line:1-4445code-line:1-4546code-line:1-4647code-line:1-4748code-line:1-4849code-line:1-4950code-line:1-5051code-line:1-5152code-line:1-5253code-line:1-5354code-line:1-5455code-line:1-5556code-line:1-5657code-line:1-5758code-line:1-5859code-line:1-5960code-line:1-6061code-line:1-6162code-line:1-6263code-line:1-6364code-line:1-6465code-line:1-6566code-line:1-6667code-line:1-6768code-line:1-6869code-line:1-6970code-line:1-7071code-line:1-7172code-line:1-7273code-line:1-7374code-line:1-7475code-line:1-7576code-line:1-7677code-line:1-7778code-line:1-7879code-line:1-7980code-line:1-8081code-line:1-8182code-line:1-8283code-line:1-8384code-line:1-8485code-line:1-8586code-line:1-8687code-line:1-8788code-line:1-8889code-line:1-8990code-line:1-9091code-line:1-9192code-line:1-9293code-line:1-9394code-line:1-9495code-line:1-9596code-line:1-9697code-line:1-9798code-line:1-9899code-line:1-99100code-line:1-100101code-line:1-101102code-line:1-102103code-line:1-103104code-line:1-104105code-line:1-105106code-line:1-106107code-line:1-107108code-line:1-108109code-line:1-109110code-line:1-110111code-line:1-111112code-line:1-112113code-line:1-113114code-line:1-114115code-line:1-115116code-line:1-116117code-line:1-117118code-line:1-118119code-line:1-119120code-line:1-120121code-line:1-121122code-line:1-122123code-line:1-123124code-line:1-124125code-line:1-125126code-line:1-126127code-line:1-127128code-line:1-128129code-line:1-129130code-line:1-130131code-line:1-131132code-line:1-132133code-line:1-133134code-line:1-134135code-line:1-135136code-line:1-136137code-line:1-137138code-line:1-138139code-line:1-139140code-line:1-140141code-line:1-141142code-line:1-142143code-line:1-143144code-line:1-144145code-line:1-145146code-line:1-146147code-line:1-147148code-line:1-148149code-line:1-149150code-line:1-150151code-line:1-151152code-line:1-152153code-line:1-153154code-line:1-154155code-line:1-155156code-line:1-156157code-line:1-157158code-line:1-158159code-line:1-159160code-line:1-160161code-line:1-161162code-line:1-162163code-line:1-163164code-line:1-164165code-line:1-165166code-line:1-166167code-line:1-167168code-line:1-168169code-line:1-169170code-line:1-170171code-line:1-171172code-line:1-172173code-line:1-173174code-line:1-174175code-line:1-175176code-line:1-176177code-line:1-177178code-line:1-178179code-line:1-179180code-line:1-180181code-line:1-181182code-line:1-182183code-line:1-183184code-line:1-184185code-line:1-185186code-line:1-186187code-line:1-187188code-line:1-188189code-line:1-189190code-line:1-190191code-line:1-191192code-line:1-192193code-line:1-193194code-line:1-194195code-line:1-195196code-line:1-196197code-line:1-197198code-line:1-198199code-line:1-199200code-line:1-200201code-line:1-201202code-line:1-202203code-line:1-203204code-line:1-204205code-line:1-205206code-line:1-206207code-line:1-207208code-line:1-208209code-line:1-209210code-line:1-210211code-line:1-211212code-line:1-212213code-line:1-213214code-line:1-214215code-line:1-215216code-line:1-216217code-line:1-217218code-line:1-218219code-line:1-219220code-line:1-220221code-line:1-221222code-line:1-222223code-line:1-223224code-line:1-224225code-line:1-225226code-line:1-226227code-line:1-227228code-line:1-228229code-line:1-229230code-line:1-230231code-line:1-231232code-line:1-232233code-line:1-233234code-line:1-234235code-line:1-235236code-line:1-236237code-line:1-237238code-line:1-238239code-line:1-239240code-line:1-240241code-line:1-241242code-line:1-242243code-line:1-243244code-line:1-244245code-line:1-245246code-line:1-246247code-line:1-247248code-line:1-248249code-line:1-249250code-line:1-250251code-line:1-251252code-line:1-252253code-line:1-253254code-line:1-254255code-line:1-255256code-line:1-256257code-line:1-257258code-line:1-258259code-line:1-259260code-line:1-260261code-line:1-261262code-line:1-262263code-line:1-263264code-line:1-264265code-line:1-265266code-line:1-266267code-line:1-267268code-line:1-268269code-line:1-269270code-line:1-270271code-line:1-271272code-line:1-272273code-line:1-273274code-line:1-274275code-line:1-275276code-line:1-276277code-line:1-277278code-line:1-278279code-line:1-279280code-line:1-280281code-line:1-281282code-line:1-282283code-line:1-283284code-line:1-284285code-line:1-285286code-line:1-286287code-line:1-287288code-line:1-288289code-line:1-289290code-line:1-290291code-line:1-291292code-line:1-292293code-line:1-293294code-line:1-294295code-line:1-295296code-line:1-296297code-line:1-297298code-line:1-298299code-line:1-299300code-line:1-300301code-line:1-301302code-line:1-302303code-line:1-303304code-line:1-304305code-line:1-305306code-line:1-306307code-line:1-307308code-line:1-308309code-line:1-309310code-line:1-310311code-line:1-311312code-line:1-312313code-line:1-313314code-line:1-314315code-line:1-315316code-line:1-316317code-line:1-317318code-line:1-318319code-line:1-319320code-line:1-320321code-line:1-321322code-line:1-322323code-line:1-323324code-line:1-324325code-line:1-325326code-line:1-326327code-line:1-327328code-line:1-328329code-line:1-329330code-line:1-330331code-line:1-331332code-line:1-332333code-line:1-333334code-line:1-334335code-line:1-335336code-line:1-336337code-line:1-337.fly-eye {
background-color:#e69138;
background:-webkit-radial-gradient(ellipse at center,rgba(255,255,255,1) 40%,rgba(51,51,51,1) 100%);
background:-moz-radial-gradient(ellipse at center,rgba(255,255,255,1) 40%,rgba(51,51,51,1) 100%);
background:-ms-radial-gradient(ellipse at center,rgba(255,255,255,1) 40%,rgba(51,51,51,1) 100%);
background:radial-gradient(ellipse at center,rgba(255,255,255,1) 40%,rgba(51,51,51,1) 100%);
border-radius:100%;
box-shadow:0 0 0 0.2em #555,0 0 0.1em 0.55em #555,inset 0 0.2em 0 0 #555;
color:rgba( 40,40,40,0.8);
line-height:1.1em;
padding-left:0.18em;
cursor:crosshair;
position:relative;
margin:20px auto 0;
width:1em;
height:1em;
-webkit-transform-origin:center;
-moz-transform-origin:center;
-ms-transform-origin:center;
transform-origin:center;
-webkit-font-smoothing:antialiased;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
-webkit-transition:all 0.8s ease-in-out;
-moz-transition:all 0.8s ease-in-out;
transition:all 0.8s ease-in-out;
-webkit-animation:eye 2.2s ease-in-out infinite,body 1.15s 1.8s linear infinite;
-moz-animation:eye 2.2s ease-in-out infinite,body 1.15s 1.8s linear infinite;
-ms-animation:eye 2.2s ease-in-out infinite,body 1.15s 1.8s linear infinite;
animation:eye 2.2s ease-in-out infinite,body 1.15s 1.8s linear infinite;
}
.fly-eye:hover {
-webkit-transform:scaleY(0.9) scaleX(0.95) translateY(-3em) translateZ(0);
-moz-transform:scaleY(0.9) scaleX(0.95) translateZ(0);
-ms-transform:scaleY(0.9) scaleX(0.95) translateY(-3em) translateZ(0);
transform:scaleY(0.9) scaleX(0.95) translateZ(0);
}
.fly-eye:before,
.fly-eye:after {
background:rgba(0,0,0,0);
border-radius:100%;
content:"";
display:none;
position:absolute;
width:1em;
height:0.1em;
-webkit-filter:blur(1px);
-webkit-transition:all 0.2s;
-moz-transition:all 0.2s;
transition:all 0.2s;
-webkit-animation-duration:0.2s;
-moz-animation-duration:0.2s;
-ms-animation-duration:0.2s;
animation-duration:0.2s;
-webkit-animation-iteration-count:infinite;
-moz-animation-iteration-count:infinite;
-ms-animation-iteration-count:infinite;
animation-iteration-count:infinite;
-webkit-animation-timing-function:ease-in-out;
-moz-animation-timing-function:ease-in-out;
-ms-animation-timing-function:ease-in-out;
animation-timing-function:ease-in-out;
}
.fly-eye:before {
top:25%;
left:1.45em;
margin-left:-1em;
-webkit-transform-origin:left;
-moz-transform-origin:left;
-ms-transform-origin:left;
transform-origin:left;
-webkit-transform:rotate(-60deg);
-moz-transform:rotate(-60deg);
-ms-transform:rotate(-60deg);
transform:rotate(-60deg);
-webkit-animation-name:wings;
-moz-animation-name:wings;
-ms-animation-name:wings;
animation-name:wings;
}
.fly-eye:after {
top:25%;
left:-2.2em;
margin-left:1em;
-webkit-transform-origin:right;
-moz-transform-origin:right;
-ms-transform-origin:right;
transform-origin:right;
-webkit-transform:rotate(60deg);
-moz-transform:rotate(60deg);
-ms-transform:rotate(60deg);
transform:rotate(60deg);
-webkit-animation-name:wings2;
-moz-animation-name:wings2;
-ms-animation-name:wings2;
animation-name:wings2;
}
.fly-eye:hover:before,
.fly-eye:hover:after {
background:#398080;
display:block;
margin-left:0;
width:2em;
height:0.3em;
}
@-webkit-keyframes updown {
0% {
top:0;
}
100% {
top:-5px;
}
}
@-moz-keyframes updown {
0% {
top:0;
}
100% {
top:-5px;
}
}
@-ms-keyframes updown {
0% {
top:0;
}
100% {
top:-5px;
}
}
@-o-keyframes updown {
0% {
top:0;
}
100% {
top:-5px;
}
}
@keyframes updown {
0% {
top:0;
}
100% {
top:-5px;
}
}
@-webkit-keyframes eye {
5%,
10% {
line-height:1.2em;
padding-left:0;
}
15%,
20% {
line-height:1.15em;
padding-left:0.4em;
}
25% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 1em 0 0 #398080;
}
23%,
27% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 0.2em 0 0 #398080;
}
}
@-moz-keyframes eye {
5%,
10% {
line-height:1.2em;
padding-left:0;
}
15%,
20% {
line-height:1.15em;
padding-left:0.4em;
}
25% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 1em 0 0 #398080;
}
23%,
27% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 0.2em 0 0 #398080;
}
}
@-ms-keyframes eye {
5%,
10% {
line-height:1.2em;
padding-left:0;
}
15%,
20% {
line-height:1.15em;
padding-left:0.4em;
}
25% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 1em 0 0 #398080;
}
23%,
27% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 0.2em 0 0 #398080;
}
}
@keyframes eye {
5%,
10% {
line-height:1.2em;
padding-left:0;
}
15%,
20% {
line-height:1.15em;
padding-left:0.4em;
}
25% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 1em 0 0 rgb(136,79,139);
}
23%,
27% {
box-shadow:0 0 0 0.2em #398080,0 0 0.1em 0.55em #398080,inset 0 0.2em 0 0 rgb(136,79,139);
}
}
@-webkit-keyframes body {
50% {
width:1.4em;
height:1.4em;
}
}
@-moz-keyframes body {
50% {
width:1.4em;
height:1.4em;
}
}
@-ms-keyframes body {
50% {
width:1.4em;
height:1.4em;
}
}
@keyframes body {
50% {
width:1.4em;
height:1.4em;
}
}
@-webkit-keyframes wings {
50% {
-webkit-transform:rotate(65deg);
-moz-transform:rotate(65deg);
-ms-transform:rotate(65deg);
transform:rotate(65deg);
}
}
@-moz-keyframes wings {
50% {
-webkit-transform:rotate(65deg);
-moz-transform:rotate(65deg);
-ms-transform:rotate(65deg);
transform:rotate(65deg);
}
}
@-ms-keyframes wings {
50% {
-webkit-transform:rotate(65deg);
-moz-transform:rotate(65deg);
-ms-transform:rotate(65deg);
transform:rotate(65deg);
}
}
@keyframes wings {
50% {
-webkit-transform:rotate(65deg);
-moz-transform:rotate(65deg);
-ms-transform:rotate(65deg);
transform:rotate(65deg);
}
}
@-webkit-keyframes wings2 {
50% {
-webkit-transform:rotate(-65deg);
-moz-transform:rotate(-65deg);
-ms-transform:rotate(-65deg);
transform:rotate(-65deg);
}
}
@-moz-keyframes wings2 {
50% {
-webkit-transform:rotate(-65deg);
-moz-transform:rotate(-65deg);
-ms-transform:rotate(-65deg);
transform:rotate(-65deg);
}
}
@-ms-keyframes wings2 {
50% {
-webkit-transform:rotate(-65deg);
-moz-transform:rotate(-65deg);
-ms-transform:rotate(-65deg);
transform:rotate(-65deg);
}
}
@keyframes wings2 {
50% {
-webkit-transform:rotate(-65deg);
-moz-transform:rotate(-65deg);
-ms-transform:rotate(-65deg);
transform:rotate(-65deg);
}
}
1code-line:2-1<div class="fly-eye">●</div>
2 comments