How to set the background image in html so that it is not repeated or tiled

coldplay.xixi
Release: 2023-01-03 09:27:45
Original
19221 people have browsed it

htmlHow to set the background image to be non-repeating and non-tiled: Set the image to be fixed so that it will not be repeated due to page scrolling. The code is [

How to set the background image in html so that it is not repeated or tiled

The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.

htmlHow to set the background image to be non-repeating and non-tiled:

1. In this way, the background image will be fixed and will not be repeated as the page scrolls.

<body style="background-p_w_picpath: url("图片文件地址"); background-p_w_upload: fixed;">
Copy after login

2. Use The image will not be displayed repeatedly on any screen size. You can set the background like this (the image is not tiled):

<body style="background-p_w_picpath: url("图片文件地址"); background-repeat:no-repeat;">
Copy after login

Related learning recommendations: html video tutorial

The above is the detailed content of How to set the background image in html so that it is not repeated or tiled. 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