Java Topics

CSS Backgrounds

 CSS background having 5 properties:

1.background-color

2.background-image

3.background-repeat

4.background-attachment

5.background-position


background-position having following types:


left top

left center

left bottom

right top

right center

right bottom

center top

center center

center bottom

50% 50%

25% 75%

10px 200px

50px 50px

intial

cssbackground.html:

<!DOCTYPE html>

<html>


<head> 

      <title> How to Create Background</title>

  

<style>

 

div.story{

             border:2px solid black;

margin:50px;

padding:20px 30px;

    color:white;

background-color:green;

background-image:url("pic3.jpg");

background-repeat:no-repeat;

<!-- background-repeat:repeat-x;-->

<!-- background-repeat:repeat-y;-->

background-position:top right;

background-attachment:scrool;

<!-- background-attachment:fixed;-->

}

 

</style>

</head>


<body>


<section>


<h1>CSS Background</h1>


<div class="story">

<p>Welcome to tvstreetechnologies</p>

</div>


<p>tvstreetechnologies.blogspot.com</p>


</section>


</body>


</html>


No comments:

Post a Comment