All about programming in GNU/LINUX

Simple CSS3 Transformations – transitions , translations and rotation

 W3C consortium was setup to standardize different browser interpreted languages , but different browser vendors wanted to provide support for experimental css3 features till they are standardized by W3C , such experimental and browser specific css3 features are to used with the prefix provided the vendor , -webkit-(chrome and safari),-o-(opera),-moz-(firefox),-ms-(IE), in the following code snippet i’ve just used -webkit- prefixes , so the code just works in Google chrome browser , to make it work in other browsers , just repeat the attributes with the vendor specific prefixes 

Image

<!DOCTYPE html>
<html>
<head>
<title>First Transform </title>
<style>
h1 {
text-align : center ;
font-family : Futura ;

}
h1:hover {

-webkit-transition :6s all steps(6,end);
-webkit-transform : translateX(600px);
/* the header (h1 ) moves on X-axis (translates) 600px to the right , but the transition(webkit-transition) effect in place
makes sure that this transition takes place over a time of 6 seconds and 6 steps on mouse hover */
}
img.tilt:hover {
-webkit-transform : rotate(9.0deg); /*Rotates the image by 9 degrees on mouse hover and transition makes the effect take place smoothly over a period of 5 seconds */
-webkit-transition : 5s all;
}
</style>
</head>
<body>
<h1>CSS3 Testing</h1>
<p><img src = “deb.jpg” style= “width:300px;height:200px; margin: 0 2em 2em 0;”class=”tilt” >Hi , this is Debian , Debian is a free Operating system , the kernel used by debian is the kernel written Linux torwals .Debian is a free and universal operating system where everything , i repeat , everything in the operating system is free , the source for every binary in DEBIAN is available, All the softwares for debian comes packaged in .deb(.debian) files where these are hosted in their official repositories </p>

</body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s