Results 1 to 2 of 2

Thread: 'background-image' Example

  1. #1
    Senior Member
    Join Date
    Oct 2012
    Posts
    73,423

    'background-image' Example

    CSS background properties are used to define the background effects of an element.

    The below properties are used to set the background effects:

    background-color
    background-image
    background-repeat
    background-attachment
    background-position

    Code:
    <html>
    <head>
    </head>
    <body>
    <div style="background:brown url(http://www.java2s.com/style/Test.png) repeat top right; 
                width:100; 
                border:3; 
                height:100; 
                font-size:14">
                
                background image
                </div>
                <br><br><br><br><br><br><br><br><br>
    <div style="background-color:blue; 
                background-attachment:fixed; 
                background-image:url(http://www.java2s.com/style/Test.png); 
                background-repeat:repeat; 
                background-position-x:top; 
                background-position-y:left; 
                width:100; 
                border:3; 
                height:100; 
                font-size:14">
                
                background-image is from url(http://www.java2s.com/style/Test.png). 
                
                </div>
    </body>
    </html>

  2. #2
    Junior Member
    Join Date
    Aug 2013
    Location
    Pakistan
    Posts
    1
    cool Sharing, thanks.:-)

Similar Threads

  1. How t o draw the Image as a background for a QGraphicsRectItem?
    By Yamini in forum Qt Application Framework
    Replies: 0
    Last Post: 12-27-2012, 04:42 PM
  2. How to set the image background transparent in qt
    By suve in forum Programming languages
    Replies: 1
    Last Post: 10-09-2012, 12:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •