I am currently doing a parallax website theme. The background images need to be attached as fixed for certain 'div's and 'section's to avoid jquery indulging in everything. The problem was the background images of the tags below any animated item disappeared while the transformation is being done, only on Google Chrome. Remedy?
相关问题
- How to change default background color for TChromi
- Stop location updates when app terminate
- Is it possible to have a element transparent and s
- ios5 background management different from ios4?
- Background image not stretching fully
相关文章
- Listview background is grey on Droid 3
- Java fixed memory map
- Background-size doesn't work
- Parallax scrolling
- Making expandable fixed footer in Bootstrap 3?
- jQuery: Animate (fade) background-color or image i
- Flutter ranging beacons in background - Android 8.
- Android layout background xml texture
I was having the same issue with Chrome, it seems to be a bug that occurs when there is too much going on inside the page, I was able to fix it by adding the following transform code to the fixed position element, (
transform: translateZ(0);-webkit-transform: translateZ(0);
) that forces the browser to use hardware acceleration to access the device’s graphical processing unit (GPU) to make pixels fly. Web applications, on the other hand, run in the context of the browser, which lets the software do most (if not all) of the rendering, resulting in less horsepower for transitions. But the Web has been catching up, and most browser vendors now provide graphical hardware acceleration by means of particular CSS rules.Using -webkit-transform: translate3d(0,0,0); will kick the GPU into action for the CSS transitions, making them smoother (higher FPS).
Note: translate3d(0,0,0) does nothing in terms of what you see. it moves the object by 0px in x,y and z axis. It's only a technique to force the hardware acceleration.
This really bugged me and it almost ruined my night. My fix is to set
It worked on my project.
Before this, I had it on fixed. Hope this helps.
Maybe a little late to answer, but it seems that the bug comes with the background-attachment: fixed property in chrome. I found a solution changin its value to "scroll". It will cause a jitterin effect on firefox but you can avoid it using a media-browser query in your CSS, something like this:
Hope it helps!
Seems to bug in Chrome the moment you add any markup on the element. Try removing the background from such element and give it a position:relative. Inside the element add a new div with the dimensions you need and add the background, just don't add any markup inside of it.
Example:
Current:
Corrected:
Hope it helps!
My task was to create a page with a parallax effect. After attempts to fix this by means of CSS I came up with the following solution.
JavaScript:
CSS:
.slider-title would be the item with background-attachment fixed.
This has been a very common unsolved mystery. Recently I had the same problem, and '-webkit-backface-visibility: hidden', proved to be less than useless (on my 'fixed' attached background), since the background just disappeared when it was set. (Additional Info: the reason is that when the background is set as fixed, it is almost similar to putting a fixed 'div' in the background and setting the original div background to be transparent. Hidden backface does the obvious).
To solve the current problem, try setting the 'position' propery of the element as 'static', or if you have given it some other value, namely 'relative', 'fixed' or 'absolute', just remove those.
If you don't remember setting the position property, and the problem still persist, my suggestion is that you use a debugging tool on chrome or firefox, to
Just spent half an hour searching... Thought this could make it easier for you... regards. :)