html - Positioning a background image in an element with an offset from the bottom -


is there way set background fixed center, , bottom, not flush bottom of element, rather 100px bottom of element?

the illustration of issue @ hand

(of course bg image visible in div bounds)

this have far, don't know how bump image 100px bottom.

background: url("/path/to/bg.jpg") no-repeat fixed center bottom #fff; 

(no javascript answers please)

very simple:

background-color: #fff; background-image: url("/path/to/bg.jpg"); background-repeat: no-repeat; background-position: center bottom 100px; /* answer */ 

ref: http://www.w3.org/tr/css3-background/#the-background-position

more read: https://developer.mozilla.org/en-us/docs/web/css/background-position


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -