简体   繁体   中英

escape special character in progid:DXImageTransform.Microsoft.AlphaImageLoader

I've found very strange action in filter: progid:DXImageTransform.Microsoft.AlphaImageLoader

<style>
 .some{ width: 16px; height: 16px;
   filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="C:/Users/usr7/Desktop/(x86)/close.png", sizingMethod='scale');
 }
</style>

<div class='some'>
 hello
</div>

If AlphaImageLoader' src has brace character that is ( ) , It don't work at ie8 and ie9. Is there any method to escape brace characters?

You should be able to use escaping for special chars inside CSS string tokens, ie replace the parentheses symbols with \\29 and \\28 (which represent left and right parentheses, accordingly).

Concrete Example

src="C:/Users/usr7/Desktop/\29x86\28/close.png"

References

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM