Home >Web Front-end >HTML Tutorial >Is Google Chrome compatible with background-attachment:fixed;? How to achieve the fixed effect of Firefox background image_html/css_WEB-ITnose

Is Google Chrome compatible with background-attachment:fixed;? How to achieve the fixed effect of Firefox background image_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:54:251728browse

rt, can anyone help me solve the problem, thank you~~


Reply to the discussion (solution)

When the page height is larger than the background image, Pull the scroll bar down and the higher part will appear white, which is the effect of Google Chrome.
The display effect of Firefox is that the background image does not move and the content scrolls, achieving the effect that the content does not exceed the background image.

All browsers support the background-attachment attribute. To achieve the effect you mentioned, just set background-attachment:fixedl; directly

All browsers support background- attachment attribute, to achieve the effect you mentioned, just set background-attachment:fixedl; directly


But I can’t see the effect of background fixation and content scrolling in Google Chrome browser

Problem solved~~

How to solve it? Please find a solution

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