Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize background Color and background Picture by css

Shulou Source: shulou.com Published: 2022-06-01 13:09:51 11月16日 Update

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!

Tags: Background picture background picture color article grammar value interest at the same time address quotation mark more friends knowledge editing industry information information channel channel reference Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft OPPO Reno Apple MariaDB Shulou Tech Info