0% completed
The CSS url()
function is used to include external resources in your styles, such as background images, fonts, or other media files. It tells the browser where to find the file you want to include.
selector { property: url('path/to/resource'); }
Explanation:
background-image
, list-style-image
, or src
in @font-face
).This example sets a background image for a container. The url()
function is used to load the image from an external source.
Explanation:
url('https://img.freepik.com/free-vector/blue-curve-frame-template_53876-116707.jpg')
to load an image from a placeholder service..background-box
appears with the specified background image covering the entire area, centered appropriately.This example uses the url()
function to set a custom image as a marker for list items.
Explanation:
background
property of each list item using url('https://img.freepik.com/free-vector/blue-curve-frame-template_53876-116707.jpg')
.Using the url()
function, you can enhance your web designs by easily incorporating external resources directly within your CSS styles.
.....
.....
.....