Animated Fish With Tank
HTML Code
<!DOCTYPE html>
<html>
<head>
<title>Animate FIsh With Bowl</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="bowl">
<div class="water">
<img src="fish.png" class="fish">
<img src="fish1.png" class="fish1">
<img src="fish3.png" class="fish3">
</div>
</div>
<div class="shadow">
</body>
</html>
<html>
<head>
<title>Animate FIsh With Bowl</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="bowl">
<div class="water">
<img src="fish.png" class="fish">
<img src="fish1.png" class="fish1">
<img src="fish3.png" class="fish3">
</div>
</div>
<div class="shadow">
</body>
</html>
CSS Code
body
{
margin: 0;
padding: 0;
background: #262626;
}
.bowl
{
position: absolute;
top: 50%;
left:50%;
transform: translate(-50%,-50%);
width: 500px;
height: 500px;
background: rgba(255,255,255,0.1);
border-radius: 50%;
border: 4px solid #fbb;
transform-origin: bottom center;
animation: animate 5s linear infinite
}
.bowl:before
{
content: '';
position: absolute;
top: -10px;
left: 50%;
transform: translate(-50%);
width: 40%;
height: 30px;
background: rgba(66,66,66);
border: 4px solid #fff;
border-radius: 50%;
}
.bowl:after
{
content: '';
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%,-50%);top width: 150px;
height: 80px;
background: rgba(255,255,255,0.1);
border-radius: 50%;
}
.water
{
position: absolute;
top: 50%;
left: 5px;
right: 5px;
bottom: 1px;
background: rgba(65,193,251,0.5);
border-bottom-right-radius: 230px;
border-bottom-left-radius: 230px;
transform-origin: top center;
animation: animateWater 5s linear infinite
}
.water:before
{
content: '';
position: absolute;
top: -10px;
left: 0;
width: 100%;
height: 20px;
border-radius: 50%;
background: #1fa4e0;
}
.shadow
{
position: absolute;
top: calc(50% + 150px);
left: 50%;
transform: translate(-50%,-50%);
width: 300px;
height: 30px;
background: rgba(0,0,0,.5);
z-index: -1;
border-radius: 50%;
}
img.fish
{
width: 100px;
animation: animateFish 4s linear infinite;
}
@keyframes animateFish
{
0%
{
transform: translate(0,0) rotateY(180deg);
}
50%
{
transform: translate(180px,0) rotateY(180deg);
}
51%
{
transform: translate(180px,0) rotateY(0deg);
}
100%
{
transform: translate(0,0) rotateY(0deg);
}
}
img.fish1
{
width: 100px;
animation: animateFish 8s linear infinite;
}
@keyframes animateFish
{
0%
{
transform: translate(0,0) rotateY(180deg);
}
50%
{
transform: translate(180px,0) rotateY(180deg);
}
51%
{
transform: translate(180px,0) rotateY(0deg);
}
100%
{
transform: translate(0,0) rotateY(0deg);
}
}
img.fish3
{
width: 75px;
animation: animateFish 6s linear infinite;
}
@keyframes animateFish
{
0%
{
transform: translate(0,0) rotateY(180deg);
}
50%
{
transform: translate(180px,0) rotateY(180deg);
}
51%
{
transform: translate(180px,0) rotateY(0deg);
}
100%
{
transform: translate(0,0) rotateY(0deg);
}
}
@keyframes animate
{
0%
{
transform: translate(-50%,-50%) rotate(0deg);
}
25%
{
transform: translate(-50%,-50%) rotate(15deg);
}
50%
{
transform: translate(-50%,-50%) rotate(0deg);
}
100%
{
transform: translate(-50%,-50%) rotate(0deg);
}
}
@keyframes animateWater
{
0%
{
transform: rotate(0deg);
}
25%
{
transform: rotate(-20deg);
}
50%
{
transform: rotate(0deg);
}
75%
{
transform: rotate(20deg);
}
100%
{
transform: rotate(20deg);
}
}
OUTPUT

52 Comments
Wow 😊😊😊😊😊
ReplyDeleteWow Jan Di👌🏻
DeleteAmazing😊😊😊
ReplyDeleteWowwww
ReplyDeleteNice fish tank
Superb Fish Tank
ReplyDeleteAmazing
ReplyDeleteVery Very Interesting
ReplyDeleteWonderful
ReplyDeleteTank
Very Very Nice
ReplyDeleteGood Animation
ReplyDeleteWow 🌼🌺🌼🌺
ReplyDeleteAttractive
ReplyDeleteWonderful 🌺😊🌼
ReplyDeleteFantastic Fish
ReplyDeleteSuperb quality and excellent
ReplyDeleteGazab
ReplyDeleteExcellent and Brilliant
ReplyDeleteWonderful
ReplyDeleteNice Post Guys
ReplyDeleteVery Stylish
ReplyDeleteLovely
ReplyDeleteFabulous idea
ReplyDeleteOsm
ReplyDeleteGreat
ReplyDeleteIntelligent work with HTML
ReplyDeleteKallu
ReplyDeleteBeautiful😍😍😍😍😍
Best Work
ReplyDeleteExclusive
ReplyDeleteBrilliant work with html
ReplyDeleteBrilliant
ReplyDeleteExcellent
ReplyDeleteInteresting
ReplyDeleteAwesome
ReplyDeleteNice Fish
ReplyDelete100%
ReplyDelete👌👌👌👌
ReplyDelete✋✋✋✋✋
ReplyDeleteMind Blowing
ReplyDeleteAmazing
ReplyDeleteSuperb
ReplyDeleteGood Works
ReplyDeleteAttractive
ReplyDeleteMind Blowing
ReplyDeleteBrilliant
ReplyDeleteAttractive
ReplyDeleteExcellent
ReplyDeleteSuperb
ReplyDeleteinteresting
ReplyDeleteWow
ReplyDeleteBrilliant
Awesome
Interesting
Excellent
Lovely
😄😄😄😄😀🥰🥰🥰🥰🥰
Kallu
ReplyDeleteWow we👌🏽👌🏽👌🏽👌🏽👌🏽👌🏽👌🏽👌🏽
Very good nice to see sundaram things are good
ReplyDeleteWow
ReplyDeleteBrilliant
Awesome
Interesting