6/7/21

CSS Tutorials :- CSS Background Property Part 1

CSS Background – CSS Property 

CSS Background property is used to define the background effects on the Html elements. There are 5 types of CSS Property that you can use it on the elements these are:- 

  1. Background-Color
  2. Background-image
  3. Background-repeat
  4. Background-position
  5. Background-attachment

CSS Background Color

This CSS property set the background color of any Html element in which the background property is used. 

Example:- 

<html>
<head>
    <title> CSS Background Property </title>
    <style>
        * {
            colorred;
        }

        h1 {
            background-coloryellow;
        }

        h2 {
            background-colorgreen;
        }

        p {
            background-colorblue;
        }
    </style>
</head>
<body>
    <h1> CSS Background Color Property.</h1>
    <h2> This is 2nd Heading.</h2>
    <p> This is a Paragraph. </p>
</html>

Output :- 

CSS Background Image 

This CSS Background Property is used to set an image as a background. You can set any type of image as a background of a html document. Just you need to enter the url or that image into you html documents.

Example:-

<html>
<head>
    <title> CSS Background Property </title>
    <style>
        body {
            background-imageurl(ex.jpg);
        }
    </style>
</head>
<body>
    <h1> CSS Background Color Property.</h1>
    <h2> This is 2nd Heading.</h2>
    <p> This is a Paragraph. </p>
</body>
</html>

Output:-



"+y+""}else{if(A==5){c+='
  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
    '+u+""+y+"
  • "}else{c+='
  • "+w+"
  • "}}}}}s.innerHTML=c+=""+y;d.callBack()};randomRelatedIndex=h;showRelatedPost=g;j(d.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")})(window,document,document.getElementsByTagName("head")[0]); //]]>

    1 comment:

    1. Wow i can say that this is another great article as expected of this blog.Bookmarked this site.. real estate photography

      ReplyDelete

    Follow on Twitter

    Linkedin

    Categories

    Mad About Computer. Powered by Blogger.
    This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.