css - Setting background-attachment:fixed and still use background-position -
i'm trying position background cover image @ bottom left of image (background-position: 0% 100%;
) , @ same time prepare position image doesn't scroll.
the problem is, background-position
beingness ignored when background-attachment:fixed
used.
some sample html:
<div class="title-section"> <div class="wrap"> <h4 class="widget-title widgettitle">my cool title</h4> </div> </div> <div class="footer-section"></div>
and relevant css:
.title-section { background-image: url(image.jpg); background-position: 0% 100%; background-attachment: fixed; background-repeat: no-repeat; background-size: cover; }
if remove background-attachment
or alter scroll, positions image correctly. need image remain in fixed position, have position bottom left of image?
i've tried adding image via <img>
tag, can't work either.
if you'd play code, i'ved added on js fiddle here: http://jsfiddle.net/bradonomics/xtjmyv7y/2/
if take out css line 5, background-attachment
property, can see rug on floor.
css image background-image background-attachment
No comments:
Post a Comment