filter-2.xhtml (1200B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <svg xmlns="http://www.w3.org/2000/svg" 3 xmlns:xlink="http://www.w3.org/1999/xlink" 4 version="1.1"> 5 6 <!-- use an empty g to force filters.svg to load before onload --> 7 <use xlink:href="../filters.svg#empty" /> 8 9 <foreignObject filter="url(../filters.svg#NonBlackToWhite)" 10 x="0" y="0" height="100%" width="100%"> 11 <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> 12 <head> 13 <title>Filter sanity-check</title> 14 <style type="text/css"> 15 html, body { margin: 0; background: white; color: black; height: 100%; width: 100%; } 16 body { position: relative; } 17 </style> 18 </head> 19 <body> 20 21 <div style="position: absolute; top: 10px; left: 10px; width: 100px; height: 10px; background: green"></div> 22 23 <div style="position: absolute; top: 30px; left: 10px; width: 94px; height: 4px; border: 3px solid #c90;"></div> 24 25 <div style="position: absolute; top: 50px; left: 10px; width: 100px; height: 10px; background: black"></div> 26 27 <div style="position: absolute; top: 70px; left: 10px; width: 94px; height: 4px; border: 3px solid #000;"></div> 28 29 </body> 30 </html> 31 </foreignObject> 32 </svg>