AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Design simple background css4/30/2024 The background-image property specifies a background image to display in the background of an element. We'll begin with some simple HTML: Exciting box! It is therefore a good idea to set a basic background color as well as specifying such features, so the element's content is readable no matter what. Background colors are supported pretty much everywhere, whereas more exotic features such as background gradients are supported only in newer browsers, plus a background image might fail to load for some reason. In addition, it is important to set a background color as a fallback.For a start, the default background color of most elements is not white (as you might expect) but transparent - therefore if you set an element's background color to something interesting, but want its child elements to be white, you'll have to set that explicitly.You'll use the background-color property very often: Let's explore a simple example to show how the four most basic properties work - you'll use these ones all the time when dealing with backgrounds. The basics: color, image, position, repeat Throughout the rest of the article, we'll look at how to use these features in detail. Note: Most of these features have really good browser support, except for the last two, from which the support is a bit more limited (Internet Explorer 9+, Safari 7+, Android 4.4+), and background gradients (Internet Explorer 9+). background-size: Allows a background image to be resized dynamically.background: Shorthand for specifying the above five properties on one line.does it scroll with the content, or is it fixed? background-attachment: Specifies the behaviour of an element's background when its content scrolls, e.g.background-repeat: Specifies whether the background should be repeated (tiled) or not.
0 Comments
Read More
Leave a Reply. |