Domanda

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

È stato utile?

Soluzione 2

Found the solution:

background-attachment: fixed

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

Altri suggerimenti

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 */
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top