In HTML, you can use the style attribute and the "background-repeat" attribute to set the image to not be tiled. The syntax is "
".
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
How to make pictures not tiled in html
If you want to make pictures not tiled in html, you need to use the style attribute and background-repeat Attributes.
The style attribute is used to set the style of the element, and the background-repeat attribute is used to define the tiling mode of the image. When the background-repeat:no-repeat style is set, the image will not be tiled.
The example is as follows:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body style="background:url(1118.02.png); background-repeat:no-repeat;"> </body> </html>
Output result:
Recommended tutorial: "html video tutorial 》
The above is the detailed content of How to prevent images from being tiled in html. For more information, please follow other related articles on the PHP Chinese website!