mhtml.css文件代码:
/*
Content-Type: multipart/related; boundary="_ANY_STRING_WILL_DO_AS_A_SEPARATOR" --_ANY_STRING_WILL_DO_AS_A_SEPARATOR Content-Location:locoloco Content-Transfer-Encoding:base64 iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7ljmRAAAAGElEQVQIW2P4DwcMDAxAfBvMAhEQMYgcACEHG8ELxtbPAAAAAElFTkSuQmCC --_ANY_STRING_WILL_DO_AS_A_SEPARATOR Content-Location:polloloco Content-Transfer-Encoding:base64 iVBORw0KGgoAAAANSUhEUgAAABkAAAAUBAMAAACKWYuOAAAAMFBMVEX///92dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYvD4PNAAAAD3RSTlMAACTkfhvbh3iEewTtxBIFliR3AAAAUklEQVQY02NgIBMwijgKCgrAef5fkHnz/y9E4kn+/4XEE6z/34jEE///A4knev7zAwQv7L8RQk40/7MiggeUQpjJff+zIpINykbIbhFSROIRDQAWUhW2oXLWAQAAAABJRU5ErkJggg== */ #test1 { *background-image:expression(function(ele){ ele.style.backgroundImage = 'url(mhtml:' + document.getElementById('data-uri-css1').getAttribute('href',4) + '!locoloco)'; }(this)); } #test2 { *background-image:expression(function(ele){ ele.style.backgroundImage = 'url(mhtml:' + document.getElementById('data-uri-css1').getAttribute('href',4) + '!polloloco)'; }(this)); } div { width: 100px; height: 100px; font: bold 24px Arial; } mhtml.htm文件代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www./TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www./1999/xhtml" dir="ltr" lang="en-US"> <head> <title>mhtml test page</title> <link type="text/css" rel="stylesheet" href="mhtml.css" id="data-uri-css1" /> </head> <body> <div id="test1">test #1</div> <div id="test2">test #2</div> </body> </html> |
|