C# Jadu
  • Home
  • Asp.net
  • Web Design
    • Html
    • Css
    • Java Script
  • Bootstrap
  • Sql
    • Queries
    • Stored Procedures
  • About Me
    • About Myself
    • My Projects
    • My CV
  • Gallery
  • Do you Know?

Wednesday, 15 June 2016

CSS Multiple Backgrounds

 Deepak Chaudhary     22:13     Css     No comments   

Hi Friends...

with multiple backgrounds, designers can achieve very interesting effects. They can stack different images as backgrounds of the same element. Each image (or layer) can be moved and animated independently, like you can see in the demo below (try hovering over the image with your mouse). All background-releated CSS rules can now take a comma-delimited list of properties, each for the specific background image:

Demo: 




HTML & CSS Code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title></title>
<style>
.space{
 /* Pass a comma separated list of backgrounds: */
 background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ6FKJ82if_pT9ITLfSd8H9a5E7MmyNaXSnHuIund4GhOpVJtkM5HVjvJVqH-W9a60K5nAjdOJSRV7tFOCtYxcVSrK5DV7hX9DRfx3TJBCT8dFHrWLf0lFBpCt46pb9CS1GIsCNEeeAuaL/s1600/rocket_big.png') no-repeat center 70px, url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi92JS-WlId87HRrbY5p-0sfHXLJ1QijYkq32PjGUvahl34sQF3Sij7tlf5qseY-EMcR1y_l5zIxaFtRe7JbtxgFZFohrNcqqwpCovRqJ4IKcJpzwIA31OzcrCBCsAa9tsFMnbTVeC8x5eB/s1600/space.jpg') no-repeat bottom center;

 width:200px;
 height:200px;
 margin: 0 auto;

 border-radius:3px;

 /* Animate the positions of both of the backgrounds */
 transition:background-position 1s;
}

.space:hover{
 /* The same goes for properties like background-position and repeat */
 background-position:35% 20px, top right;
}
</style>

</head>

<body>
<div class="space">
</div>
</body>

</html> >



Thank You...! 

 
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Most Popular posts

  • How To Create Image wipe Effect With CSS3 Webkit Animation
    Hi Friends... In this article we learn how to create a Image wipe effect with CSS3. CSS transition and animations provide a way for web de...
  • CSS 3D Cube
    Hi Friends... CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a lang...
  • CSS 3D Transforms
    Hi Friends... There is nothing more flashy and full with eye-candy than an impressive 3D CSS demo. Although its utility outside of demos ...

About Me

Deepak Chaudhary
View my complete profile

Copyright © C# Jadu | Powered by Blogger
Design by Deepak Chaudhary