I'm wondering if this is possible with CSS. I want my background image to begin from an absolute center alignment and tile repeat outwards from there.

Background image to repeat outwards from center

有帮助吗?

解决方案 2

Found the solution:

background-attachment: fixed

See example: http://codepen.io/ryanmclaughlin/pen/3ba02dcabedee91b09cf816d43d148c4

其他提示

You can use background-position property to center the background and set the repeat value to background, background: url('yourimage') repeat;

#pattern{
    background: url('pattern.jpg') center center;
    /* other stuff here */
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top