Usually when we let the background is the image of an object. When that picture showing the car to limit the size of the object. If the size of the object larger or smaller than the size of the backgound image will show no interest.
But with CSS3, the problem may have been resolved. With the size of any object, the image will be scaled according to size.
Example: View demo
Source CSS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | .back { color:#FFF; background-image: url(bgcss3.gif); background-repeat:no-repeat; background-position:center center; -o-background-size: 100% 100%, auto; -moz-background-size: 100% 100%, auto; -webkit-background-size: 100% 100%, auto; background-size: 100% 100%, auto; } .div1 {width:200px; height:150px; padding:10px; margin-left:10px;} .div2 {width:300px; padding:10px; margin-left:10px;} .div3 {float:left; padding:10px; margin-left:10px;} .back h4 {padding:5px 0; margin:0;} .back p {padding:5px 0; margin:0;} |
Html Source:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <div class="back div1"> <h4>A Box with known width AND height</h4> <p>Cascading Style Sheets (CSS) are the modern standard FOR website presentation. When combined with structural markup language like HTML, XHTML, OR XML (though NOT limited TO these).</p> </div> <br /> <h3>A Box with known width AND unknown height</h3> <div class="back div2"> <h4>A Box with known width AND unknown height</h4> <p>CSS provide Internet browsers with the information that enables them TO present all the visual aspects AND elements of a web document. CSS apply things like borders, spacing between paragraphs, margins, headings on images, control of font faces OR colors, background colors AND images, textual effects like underlined OR strike-through text, layering, positioning, AND a number of other presentational effects.</p> <p>Css3c.com will give examples of applications CSS3 HTML5, menu styles, the javascript Gallery, Flash AND XML … especially on IE6 bugs AND how TO fix them..</p> </div> <br /> <h3>A Box with unknown width AND unknown height</h3> <div class="back div3"> <h4>A Box with unknown width AND unknown height</h4> <p>By using modern standards like CSS AND XHTML, you can dramatically reduce the cost of building AND maintaining a website when compared TO legacy HTML-only pages. You can also greatly reduce the amount of physical bandwidth AND hard disk space required, resulting in immediate long-term benefits FOR any webmasters AND web visitor.</p> <p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices<br />posuere cubilia Curae; Pellentesque habitant morbi tristique<br />senectus et netus et malesuada fames ac turpis egestas.</p> <p>CSS controls the presentational aspects of a web page’s design, whereas HTML, XHTML, OR XML control the structure of a webpage, which means more than determining that certain text is a heading, other text is a paragraph, other text os a list of hyperlinks, AND so on.</p> </div> |
However, like other attributes of CSS3 is still work in IE


February 4th, 2011 at 5:41 am
I just like the helpful information you supply for your articles. I will bookmark your weblog and check again right here frequently. I am rather sure I will be told many new stuff proper here! Good luck for the following! Executive Elite, 18a Greycoat Gardens, Greycoat Street, London, SW1P 2QA, 028 2088 0135
February 10th, 2011 at 2:02 am
Wonderful website. A lot of helpful information here. I’m sending it to a few buddies ans also sharing in delicious. And of course, thanks to your effort! – Elegant London Escorts, 65-67 Brewer Street, Floor: 2, London W1F 9UP. Phone: 020 3011 2941
March 17th, 2011 at 3:22 am
[...] reached candidate recommendation in December 2009, however reverted to a last call working draft in June 2010 in order to introduce several [...]
June 1st, 2011 at 8:10 am
Thank you so much for providing individuals with remarkably spectacular opportunity to read articles and blog posts from this web site. It’s always so pleasant and packed with a lot of fun for me and my office peers to search your web site particularly three times weekly to learn the latest issues you have. And indeed, I’m actually contented considering the beautiful strategies served by you. Selected two areas on this page are definitely the best we’ve had.