How to realize background Color and background Picture by css
This article mainly introduces css how to achieve background colors and background pictures, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Css background Color (background-color)
Syntax:
Background-color: color values are transparent transparent by default
Background picture: background-image
Syntax:
Background-image: none | url
None: no background picture
Url: use absolute positioning or relative address to specify background image. Quotation marks are not required in url.
Div {width: 600px; height: 300px; background-color: pink; background-image: url (images/ldh.jpg) } Thank you for reading this article carefully. I hope the article "how to achieve background colors and background pictures in css" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!