Home > Web Front-end > CSS Tutorial > What is the method to introduce local images in css

What is the method to introduce local images in css

王林
Release: 2023-01-03 09:25:09
Original
9115 people have browsed it

How to introduce local images in css: You can use the background attribute, such as [background:url(images/2.jpg) no-repeat;]. The background property sets all background properties in one statement.

What is the method to introduce local images in css

The operating environment of this article: windows10 system, css3, thinkpad t480 computer.

Attribute introduction:

background is a shorthand attribute, which can set all background attributes in one statement.

You can set the following properties:

  • background-color

  • ##background-position

  • background-size

  • background-repeat

  • background-origin

  • background- clip

  • background-attachment

  • background-image

Specific method:


What is the method to introduce local images in css

Run results:

What is the method to introduce local images in css

Related recommendations:

CSS tutorial

The above is the detailed content of What is the method to introduce local images in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template