css background-image property
Translation results:
background
UK[ˈbækgraʊnd] US[ˈbækˌɡraʊnd]
n. (painting, etc.) background; background color; background information; soundtrack
Plural: backgrounds
image
##英[ˈɪmɪdʒ] 美[ˈɪmɪdʒ] n. Image; portrait; concept, intention; mirror, Imagevt. Reflect; imagine; make an image of; symbolizeThird person singular: images Plural: images Present participle: imaging Past tense: imaged Past participle: imagedcss background-image propertysyntax
How to use the background-image attribute?
The background-image attribute sets the background image for the element. The syntax is: background-image:url (picture path). The background image you set takes up the full size of the element, including padding and borders, but not margins.
Function: Set the background image for the element.
Note: The background of the element occupies the entire size of the element, including padding and borders, but does not include margins. By default, the background image is placed in the upper left corner of the element and repeats horizontally and vertically.
Note: The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8).
css background-image propertyexample
<html> <head> <style type="text/css"> body {background-image:url('http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg');} </style> </head> <body></body> </html>
Run instance »
Click the "Run instance" button to view the online instance
Popular Recommendations
- Go Context — TODO() vs Background() No more confusing!
- How JavaScript Works in the Background: Understanding Its Single-Threaded Nature and Asynchronous Operations
- How to fix Nextjs image not loading on production
- Creating Docker Image of Spring Boot Application using Buildpacks
- Optimizing Image Upload with Cropping and Compression in Next.js Projects
- Extract Files from System Image Backup Windows 11/10 – A Guide!