I have a problem - in fact I want to do something like a mask vertical scrolling area.
It may be a good example if you scroll down and there is an iframe with some parallax elements.
I need a main device code> background-attachment: fixed; , and a section within main device with a fixed background for its section, I want to scroll the whole image, not only showing some part of it
Although this background-attachment: has been fixed; class Div id = "img-strip" & gt; & Lt; Div class = "bg-fix slide-img" & gt; & Lt; / Div & gt; & Lt; Div class = "bg-fix slide-img" & gt; & Lt; / Div & gt; & Lt; Div class = "bg-fix slide-img" & gt; & Lt; / Div & gt; & Lt; Div class = "bg-fix slide-img" & gt; & Lt; / Div & gt; & Lt; / Div & gt;
css
.bg-fix {background-attachment: fixed; } # Img-strip {border: 1px solid # ffff00; Height: 200 pixels; Width: 200px; Overflow: scroll; Z-index: 30; } .slide-img {height: 300px; Width: 300px; Display area; } .slide-img: nth-child (even) {background-image: url (https://www.webkit.org/blog-files/acid3-100.png); Background color: red; } .slide-img: nth-child (weird) {background-image: url (http://drublic.de/blog/wp-content/uploads/2011/10/rotate-images.jpg); Background color: blue; Margin: 0; }
Thanks for helping
I understand that What you were asking for a while later: P is the solution for this:
/ * below your CSS * / .bg-fix {background-attachment: fixed;} / * Remove line background- attachment: fixed; .slide-img: nth-child (odd) * / .slide-img: nth-child (weird) {background-attachment: fix; Background-image: url (http://drublic.de/blog/wp-content/uploads/2011/10/rotate-images.jpg); Background color: blue; Margin: 0; }
Comments
Post a Comment