开发者

issue with background attachment [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

i had been trying to use background attachment property and the issue that i m facing is that after i use the fixed property, the image in the background gets aligned weirdly开发者_如何转开发 ..the image moves to left .. please suggest anything that i can do to avoid this issue ..


Look into background-position. You could add something like:

background-position: top center;

to keep it fixed to the top and center. You can also specify pixel values.


background-attachment: fixed will position the background relative to the viewport, rather than the element the background is applied to.

This is the basis for Eric Meyer's Complex Spiral Demo. There are more specific details on the linked page.

So, unfortunately, the answer is No. You cannot avoid this behavior and still used background-attachment: fixed

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜