I'm trying to place an animated gif
over a jpg
, and it seems to work in most browsers (IE, Firefox, iPhone, iPad), but there is a strange box around the animated gif
in chrome on windows, firefox for the mac, and chrome for the mac.
I finally solved it through a few odd hacks, like forcing the image to resize to 99.9%, using a mask to only allow a portion of the animated gif to show through, but is there a better/cleaner cross browser solution?
I basically started with a div and an image inside, both of which are responsive.
HTML:
<div>
<img src="http://www.enjoyillinois.com/images/animations/Garden_of_Gods_anim_full.gif" />
</div>
CSS:
div {
background-image: url("http://www.enjoyillinois.com/images/animations/Garden_of_Gods_bg.jpg");
background-repeat: no-repeat;
background-size: cover;
}
img {
width:100%;
display:block;
}
Here is a jsfiddle: http://jsfiddle.net/GyDCx/7/
Open the Chrome app and, in the upper right corner, tap on the Settings kebab menu. Scroll down to Site settings. Tap Pop-ups and redirects and tap the toggle to block pop-ups. When disabled, the toggle should be grey.
The Google Chrome pop-up virus is a common and frustrating malware on Android phones. The most common cause for this virus is downloading apps from third-party or unknown sources which contain the malware. The most important thing is to NOT tap anywhere on the pop-up!
Power to the Developer! Was this reply helpful? Hi Meiko27, that blue border means your device is going into Tablet Mode automatically for some unknown reason . . . That's It!
It's a image edge scaling problem, the solution I use in such cases is:
img{ image-rendering:-webkit-optimize-contrast; }
That disables the blurry edge when scaling images. http://jsfiddle.net/GyDCx/31/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With