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?
(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
Post a Comment