1, the filter
filter : progid:DXImageTransform.Microsoft.AlphaImageLoader ( enabled=bEnabled , sizingMethod=sSize , src=sURL )
Attributes:
- enabled: Optional. Boolean value (Boolean). Search filter installed or is activated. true | false
- true: The default values. Filter activated.
- false: filters are disabled.
- sizingMethod: Optional. String (String). Set or retrieve the filter object image displayed in the action object container boundaries.
- crop: Cut the picture to fit the object size.
- image: default. Increasing or decreasing the size of the boundary object to accommodate the size of the picture.
- scale: scale the image to fit the size of the boundary of the object.
- Each attribute value represent meaning: http://images.cnblogs.com/cnblogs_com/rainman/139529/o_ie6_png_filter.png
- src: Required. String (String). Use absolute or relative url address to specify a background image. If you omit this parameter, the filter will not act.
Examples
.png { background: url (absolute path /images/bg.png) repeat; _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='scale', src="绝对路径/images/bg.png"); _background:none; }
to sum up
-
Background can not be tiled;
-
Background image can not be located, that is, not use the background-position property, and therefore not easy to make CSS Sprite;
-
At the same time the performance is also a small problem, the page number is not a lot of time this way is feasible
-
src attribute of the filter in the absolute best path to take, if taking a relative path must be relative to the current path of the page, rather than our customary "relative to the path css"
-
AlphaImageLoader filter cause an invalid region of the links and buttons, the solution is added as a link or button: position: relative; this bar code to float relative.
-
In order for the filter to function, it should be set for the width and height of the container.
-
Use only as background for a disguised form of PNG image processing needs.
-
sizingMethod = 'scale', which is stretched over Tanabata oh ah image, can be simulated tile.
2、iepngfix.htc
- URL: http://www.twinhelix.com/css/iepngfix/
- The principle also filters, these operations will .htc packaged into a file, more convenient to use.
- Demo:http://www.twinhelix.com/css/iepngfix/demo/
3、DD_belatedPNG
- This js plugin uses the Microsoft VML rendering language, while most other PNG solve the problem using a plug-js AlphaImageLoader filter.
- It supports backgrond-position and background-repeat This is the other plug-ins do not have js while DD_belatedPNG also supports a:.. Hover attributes, and label
- URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
- Demo:http://www.ediyang.com/demo/DD_Png/
Reference article
Reproduced in: https: //www.cnblogs.com/rainman/archive/2011/09/11/2173735.html