Comments (2)
My bad, with the class on the <picture>
tag the image was too high up, and after further testing, I noticed a piece of CSS that was not documented on the readme.
The readme writes:
.jarallax { position: relative; z-index: 0; } .jarallax > .jarallax-img { position: absolute; object-fit: cover; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }You can include it from /dist/jarallax.css.
So I just copy-pasted that block of CSS guessing that it was all it takes to use the picture tag, then I found this example https://codepen.io/_nK/pen/VwxpPoz where there is an added selector for the <img>
tag that fixes some styling:
.jarallax-img img {
position: absolute;
object-fit: cover;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
Without that block, with some image sizes, you could find white space inside jarallax below the image.
See the issue inside this Codepen https://codepen.io/Hecsa/pen/zYmOxBg, when the 1920x600 image is visible, scrolling up and down reveals a white area between the image and the red block.
from jarallax.
Confirmed!
from jarallax.
Related Issues (20)
- IE11 with the node_modul implementation doesn't work, because babel doesn't work with the src files HOT 1
- How to disable jarallax only for safari Mac OS HOT 1
- Problem while trying to build/run jaralax with an angular universal app. HOT 3
- Local Video doesn't play in Safari HOT 2
- Don't force usage of 'jarallax-img' HOT 1
- add async support HOT 1
- "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube-nocookie.com') does not match the recipient window's origin ('https://myapp.com')" HOT 2
- Replace deprecated Vimeo Simple API usage HOT 2
- ChainAlert: npm package release (2.0.0) has no matching tag in this repo
- Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-full-version-list'. HOT 1
- WebP detection with Modernizr HOT 1
- videoPlayOnlyVisible HOT 1
- Image is not changing when used picture tag on resize, its working only for page reload HOT 1
- Unable to override jQuery defaults with data attributes - since it works partially, it's a BUG, not a FR HOT 1
- Image horizontal background position ignored HOT 1
- Glitching on scroll HOT 3
- is there any way to pause video by default.I tried with autoplay option but it is not working... HOT 1
- Image Height Calculation is Off using Data Attribute HOT 1
- Options: multiple types simultaneously on an element HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jarallax.