How to stretch the background image to the entire page in VS2008 instead of tiled_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:18:05
Original
2189 people have browsed it

How to stretch the background image to the entire page in VS2008 instead of tiled


Reply to the discussion (solution)

It is not possible and it is not practical

The background image cannot be stretched. This has nothing to do with VS. This is the characteristic of HTML.
Alternative implementation method:
Use the img tag and set the width and height to 100% (it is recommended to set it to the size of your content. You can get the actual size of the content on the page after the page is loaded) and use it as the background. The actual content is written in a div layer with absolute positioning (position:'absolute'), so that it can be above the img image
But as mentioned above, it is not practical, the proportion cannot be guaranteed, and the possibility of deformation is high

No. The general approach is to set the size of the background image to the page size, otherwise it will be easy to tile and the background will be repeated

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