Image Animation Using CSS and HTML
Hello, guys. Today topic is image animation using simple CSS and HTML. After completing the previous topic “Create Image animation Like Pendulum using CSS in HTML”, I will discuss a new animation tutorial.
In a website, the animation is a dynamic medium and new creativity in which images are manipulated to appear as moving images. In this tutorial, I will show you a beautiful image animation in your HTML web page. You need to follow the simple CSS and HTML code. It’s easy to apply in an HTML website or an HTML page. Follow the example code and try with example code.
HTML CODE
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel=”stylesheet” type=”text/css” href=”style.css”>
</head>
<body>
<section class=”container”>
<div class=”section first”>
<div class=”cont_title”>
<h1>Tutorial<br></h1>
<h3>datainflow</h3>
</div>
<div class=”cont_desc”>
<p>DataInFlow is a platform, where you can the get text tutorial and video tutorial of different kind of programming language like PHP, HTML, Javascript, Jquery, CSS3 etc.</p>
</div>
</div>
<div class=”section”>
<div class=”cont_title”>
<h1>Sports<br></h1>
<h3>datainflow</h3>
</div>
<div class=”cont_desc”>
<p>DataInFlow also provides latest sports articles, news on cricket (International, IPL etc), Football (Laliga, EPL, Seria, Bundesliga etc.) and other kind of sports.It also contains live cricket and football playing score board.</p>
</div>
</div>
<div class=”section”>
<div class=”cont_title”>
<h1>Ask Question</h1>
<h3>National Park</h3>
</div>
<div class=”cont_desc”>
<p>If you are a programmer you much like DataInFlow.com because it provides you to ask any kind of programming questions and get answer in quick time. Also you can answer any others question if you know.</p>
</div>
</div>
<div class=”section”>
<div class=”cont_title”>
<h1>Entertainment<br></h1>
<h3>datainflow</h3>
</div>
<div class=”cont_desc”>
<p>DataInFlow is also a blog platform here you will not only get sports article but you will also get entertainment article here.</p>
</div>
</div>
</section>
</body>
</html>
<html>
<head>
<title></title>
<link rel=”stylesheet” type=”text/css” href=”style.css”>
</head>
<body>
<section class=”container”>
<div class=”section first”>
<div class=”cont_title”>
<h1>Tutorial<br></h1>
<h3>datainflow</h3>
</div>
<div class=”cont_desc”>
<p>DataInFlow is a platform, where you can the get text tutorial and video tutorial of different kind of programming language like PHP, HTML, Javascript, Jquery, CSS3 etc.</p>
</div>
</div>
<div class=”section”>
<div class=”cont_title”>
<h1>Sports<br></h1>
<h3>datainflow</h3>
</div>
<div class=”cont_desc”>
<p>DataInFlow also provides latest sports articles, news on cricket (International, IPL etc), Football (Laliga, EPL, Seria, Bundesliga etc.) and other kind of sports.It also contains live cricket and football playing score board.</p>
</div>
</div>
<div class=”section”>
<div class=”cont_title”>
<h1>Ask Question</h1>
<h3>National Park</h3>
</div>
<div class=”cont_desc”>
<p>If you are a programmer you much like DataInFlow.com because it provides you to ask any kind of programming questions and get answer in quick time. Also you can answer any others question if you know.</p>
</div>
</div>
<div class=”section”>
<div class=”cont_title”>
<h1>Entertainment<br></h1>
<h3>datainflow</h3>
</div>
<div class=”cont_desc”>
<p>DataInFlow is also a blog platform here you will not only get sports article but you will also get entertainment article here.</p>
</div>
</div>
</section>
</body>
</html>
STYLE.CSS CODE
.container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
height: 100vh;
width: 100vw;
}
.container:hover > .section {
-webkit-filter: brightness(22%);
filter: brightness(22%);
}
.container:hover > .section:hover {
-webkit-filter: brightness(100%);
filter: brightness(100%);
}
.container .section {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
position: relative;
height: 100%;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
box-sizing: border-box;
text-align: center;
-ms-flex: 1;
flex: 1;
}
.container .section .cont_title {
position: relative;
margin: auto;
width: 100%;
height: auto;
text-align: center;
margin-top: 37vh;
}
.container .section .cont_title h1 {
text-transform: uppercase;
color: white;
font-family: ‘Economica’, sans-serif;
text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
font-size: 3.5vw;
margin: 0;
-webkit-transition: font-size 0.3s;
transition: font-size 0.3s;
vertical-align: middle;
}
.container .section .cont_title h3 {
text-transform: uppercase;
font-family: ‘Economica’, sans-serif;
font-size: 1.3vw;
-webkit-transition: all 0.3s;
transition: all 0.3s;
color: white;
letter-spacing: 3px;
text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
}
.container .section .cont_desc {
position: relative;
display: block;
text-align: center;
width: 12vw;
height: auto;
margin: auto;
opacity: 0;
-webkit-transition: opacity 0.8s, padding-top 0.9s, -webkit-transform 0.7s;
transition: opacity 0.8s, padding-top 0.9s, -webkit-transform 0.7s;
transition: opacity 0.8s, transform 0.7s, padding-top 0.9s;
transition: opacity 0.8s, transform 0.7s, padding-top 0.9s, -webkit-transform 0.7s;
padding-top: 6vh;
-webkit-transform: scale(1);
transform: scale(1);
}
.container .section .cont_desc p {
margin: 0;
font-family: ‘Economica’, sans-serif;
color: white;
font-size: 16px;
}
.container .section:hover {
-webkit-box-flex: 1.8;
-ms-flex-positive: 1.8;
flex-grow: 1.8;
-webkit-transition: -webkit-box-flex 0.2s;
transition: -webkit-box-flex 0.2s;
transition: flex 0.2s;
transition: flex 0.2s, -webkit-box-flex 0.2s, -ms-flex 0.2s;
}
.container .section:hover > .cont_title h1 {
font-size: 5.3vw;
-webkit-transition: font-size 0.4s;
transition: font-size 0.4s;
}
.container .section:hover > .cont_title h3 {
font-size: 1.6vw;
-webkit-transition: all 0.4s;
transition: all 0.4s;
}
.container .section:hover > .cont_desc {
opacity: 1;
padding-top: 2vh;
-webkit-transform: scale(1.5);
transform: scale(1.5);
-webkit-transition: opacity 0.7s, padding-top 0.5s, -webkit-transform 0.1s;
transition: opacity 0.7s, padding-top 0.5s, -webkit-transform 0.1s;
transition: opacity 0.7s, padding-top 0.5s, transform 0.1s;
transition: opacity 0.7s, padding-top 0.5s, transform 0.1s, -webkit-transform 0.1s;
-webkit-transition-delay: 0s, 0.1s, 0s;
transition-delay: 0s, 0.1s, 0s;
}
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
height: 100vh;
width: 100vw;
}
.container:hover > .section {
-webkit-filter: brightness(22%);
filter: brightness(22%);
}
.container:hover > .section:hover {
-webkit-filter: brightness(100%);
filter: brightness(100%);
}
.container .section {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
position: relative;
height: 100%;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
box-sizing: border-box;
text-align: center;
-ms-flex: 1;
flex: 1;
}
.container .section .cont_title {
position: relative;
margin: auto;
width: 100%;
height: auto;
text-align: center;
margin-top: 37vh;
}
.container .section .cont_title h1 {
text-transform: uppercase;
color: white;
font-family: ‘Economica’, sans-serif;
text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
font-size: 3.5vw;
margin: 0;
-webkit-transition: font-size 0.3s;
transition: font-size 0.3s;
vertical-align: middle;
}
.container .section .cont_title h3 {
text-transform: uppercase;
font-family: ‘Economica’, sans-serif;
font-size: 1.3vw;
-webkit-transition: all 0.3s;
transition: all 0.3s;
color: white;
letter-spacing: 3px;
text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.5);
}
.container .section .cont_desc {
position: relative;
display: block;
text-align: center;
width: 12vw;
height: auto;
margin: auto;
opacity: 0;
-webkit-transition: opacity 0.8s, padding-top 0.9s, -webkit-transform 0.7s;
transition: opacity 0.8s, padding-top 0.9s, -webkit-transform 0.7s;
transition: opacity 0.8s, transform 0.7s, padding-top 0.9s;
transition: opacity 0.8s, transform 0.7s, padding-top 0.9s, -webkit-transform 0.7s;
padding-top: 6vh;
-webkit-transform: scale(1);
transform: scale(1);
}
.container .section .cont_desc p {
margin: 0;
font-family: ‘Economica’, sans-serif;
color: white;
font-size: 16px;
}
.container .section:hover {
-webkit-box-flex: 1.8;
-ms-flex-positive: 1.8;
flex-grow: 1.8;
-webkit-transition: -webkit-box-flex 0.2s;
transition: -webkit-box-flex 0.2s;
transition: flex 0.2s;
transition: flex 0.2s, -webkit-box-flex 0.2s, -ms-flex 0.2s;
}
.container .section:hover > .cont_title h1 {
font-size: 5.3vw;
-webkit-transition: font-size 0.4s;
transition: font-size 0.4s;
}
.container .section:hover > .cont_title h3 {
font-size: 1.6vw;
-webkit-transition: all 0.4s;
transition: all 0.4s;
}
.container .section:hover > .cont_desc {
opacity: 1;
padding-top: 2vh;
-webkit-transform: scale(1.5);
transform: scale(1.5);
-webkit-transition: opacity 0.7s, padding-top 0.5s, -webkit-transform 0.1s;
transition: opacity 0.7s, padding-top 0.5s, -webkit-transform 0.1s;
transition: opacity 0.7s, padding-top 0.5s, transform 0.1s;
transition: opacity 0.7s, padding-top 0.5s, transform 0.1s, -webkit-transform 0.1s;
-webkit-transition-delay: 0s, 0.1s, 0s;
transition-delay: 0s, 0.1s, 0s;
}
Related posts