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
We had a similar problem with a
position: fixed;
element. This element contained a relatively positioned container, containing an absolutely positioned image. On CSS transition the image disappeared, when the transition was done is re-appeared.We tried solving the problem by setting the
-webkit-backface-visibility
tohidden
on several elements, including the body element, but this did not help. With the help of this thread we used Chrome's web inspector to fiddle around with elments'position
properties and luckily were able to solve the problem without having to alter the site that much. (all we had to do was change the position of the parent of the fixed element tostatic
)i also had same issues in chrome
it's very simple no need to add any webkit & media tag just follow below steps
1.instead of background:url('path-to-image') set the image like below and set the position as fixed
2. it will work in chrome as well as IE browser
I've had this problem on overlay div below popup window (randomly disappearing in opera 20) - both animated, and activated by script.
Overlay was positioned absolutely (.popupoverlay), but in container which wasn't positioned in any way. I've copied overlay's absolute positioning to parent (.popup) and it works OK.
I think problem appears only when positioning of parent elements isn't obvious.
Glad if helped anyone. Regards
Here is a solution that works (2014.7.11) at firefox 30.0, chrome 35.0, opera 22.0, ie 11.0:
STEP 1: add these lines at .htaccess:
STEP 2: add images preloading, for example:
P.S. thanks Shawn Altman
So I am on Chrome version 40 and still seeing this issue. The workaround which is working for me at the moment is by creating a inner div setting position relative on that div and making it fit the height of its parent and setting the background on the parent div with a background attachment of fixed:
The problem seems to occur when you have a position relative and background attachment fixed on the same element in my case.
Hope this helps.
Another workaround if you must have position: fixed/relative/absolute maybe because you have an absolutely positioned element inside (as was my case) is to create a wrapper div inside of the flickering div and move the position and background property to that.
e.g.
you had -
Possible workaround
I don't have the flicker anymore, apparently the flicker bug does not descend to child containers.