Home  >  Article  >  Web Front-end  >  How to set the background image in html so that it is not repeated or tiled

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

coldplay.xixi
coldplay.xixiOriginal
2021-03-04 16:49:0419196browse

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;">

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;">

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!

Statement:
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