A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/functions/url below:

CSS images: url() · WebPlatform Docs

CSS images: url() Summary

CSS has a variety of different properties that can reference an image file, displaying that file on a web page normally as part of an element’s background. This is done using the CSS image syntax, which is url().

Usage

Usage is simple — you insert the path to the image you want to include in your page inside the brackets of url(), for example:

background-image: url('images/my-image.png');

Note about formatting: The quotes around the URL can be either single or double quotes, and they are optional. However, if you are including some special characters such as single or double quotes, parentheses, and white space, then if the URL is not quoted, those special characters need to be escaped with a backslash(\).

This will cause my-image.png to be displayed in the background of whatever element or elements the background-image property is applied to. Accepted image formats are:

Browser support notes Properties that accept URL as a value

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4