CSS Background Sizing Polyfill

CSS Background Sizing Polyfill?

could try this.

http://nooshu.com/jquery-plug-in-scalable-background-image

I'm in the process of looking as well.

How do I make background-size work in IE?

A bit late, but this could also be useful. There is an IE filter, for IE 5.5+, which you can apply:

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale');

-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale')";

However, this scales the entire image to fit in the allocated area, so if you're using a sprite, this may cause issues.

Specification: AlphaImageLoader Filter @microsoft

How do I make background-size work in IE8?

This question got answered intensively here:

How do I make background-size work in IE?

The most popular fix is this background-size polyfill:

https://github.com/louisremi/background-size-polyfill

Stretch and scale CSS background

For modern browsers, you can accomplish this by using background-size:

body {
background-image: url(bg.jpg);
background-size: cover;
}

cover means stretching the image either vertically or horizontally so it never tiles/repeats.

That would work for Safari 3 (or later), Chrome, Opera 10+, Firefox 3.6+, and Internet Explorer 9 (or later).

For it to work with lower verions of Internet Explorer, try these CSS:

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')";

Background-size-polyfill does not work in IE8?

.htaccess won't do anything in your Windows filesystem, such as serving the file with the correct MIME type to IE, which is required for .htc files to do anything. You need to place it inside a running Apache server; it's a list of instructions for the server to perform.

If you don't have access to a development server or something else already established, you could try WAMP or another method of getting a local Apache server running.

Turns out the real answer was found on GitHub elsewhere. The asker wasn't running in Standards mode, causing the ms-behavior: declaration to fail; Quirks mode only recognizes behavior:.

background-size before IE9

You can used the AlphaImageLoader Filter to solve this issue.

Also, you can check this post, which is similar to your issue.
How do I make background-size work in IE?



Related Topics



Leave a reply



Submit