Social Icons

twitter facebook google plus

Pages

Sunday, 26 January 2014

Make effects for your blogs and websites using HTML

Hello friends..
I think you like my previous post"How to change background color". This time I come here with an another Animation post using CSS & JAVASCRIPT in HTML.
In this post i tried to explain some effects which we can add in our websites and blogs.I have you all like this.

HTML CODE
<html>
<head>
<title>Animation 2</title>
<link rel="stylesheet" type="text/css" href="name.css">
<script type="text/javascript">
function fadeOut(el)
{
var elem=document.getElementById(el);
elem.style.transition="opacity 1s linear 0s";
elem.style.opacity=0;
}
function fadein(el)
{
var elem=document.getElementById(el);
elem.style.transition="opacity 1s linear 0s";
elem.style.opacity=1;
}
function slideClosed(el) 
{
var elem=document.getElementById(el);
elem.style.transition="height 1s linear 0s";
elem.style.height="0px";
}
function slideOpen(el)
{
var elem=document.getElementById(el);
elem.style.transition="height 1s linear 0s"
elem.style.height="300px";
}
</script>
</head>
<body>
<strong><h3>CLICK ON BUTTON</h3></strong>
<input type="button" value="Fadeout" onClick="fadeOut('box')"/>
<input type="button" value="Fadein" onClick="fadein('box')"/>
<input type="button" value="Slide close" onClick="slideClosed('box')"/>
<input type="button" value="Slide open" onClick="slideOpen('box')"/>
<div id="box"><h2>THINK DIFFERENT</h2></div>
</body>
</html> 
CSS CODE

#box
{
background:#3F0;
width:320px;
height:240px;
overflow:hidden;
}
h2
{
padding-left:100px;
color:#F00;
padding-top:50px;
}
h3

  padding-left:100px;
}
Animation 2

CLICK ON BUTTON

Tuesday, 21 January 2014

HOW TO MAKE ANIMATED BACKGROUND USING HTML

Hello friends..
First of all HAPPY NEW YEAR to all of you.this is my first post in 2014.
This year my target is to learn CSS,JAVASCRIPT & PHP and I have already started it.Using CSS and
JAVASCRIPT in HTML we can make our page very attractive.
In this post i'll explain the animation in html that is"How to change the background color only by clicked the  button".
HTML CODE
<html>
<head>
<title>animation</title>
<link rel="stylesheet" type="text/css" href="2.css">
<script type="text/javascript">
function changeBG(el,clr)
{
var elem=document.getElementById(el);
elem.style.transition="background 2.0s";
elem.style.background=clr;
}
</script>
</head>
<body>
<h3>CLICK ON ANY BUTTON</h3>
<form id="form">
input type="button" value="megenta" onClick="changeBG('box','#F0F')"/>
<input type="button" value="green" onClick="changeBG('box','#0c0')"/>
<input type="button" value="black" onClick="changeBG('box','#000')"/>
</form>
<div id="box"><h1>Hello i am Sanjay Singh</h1></div>
</body>
</html>
CSS CODE
#box
{
background:#36C;
width:640px;
height:480px;
}
h1
{
color:#FF0;
padding-top:180px;
padding-left:150px;
}
h3
{
color:#009;
padding-left:150px;
}
#form
{
padding-left:150px;
}
animation

CLICK ON ANY BUTTON

THINK DIFFERENT

 

OUR VISION

think different

ABOUT US