OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html lang="en"> | 2 <html lang="en"> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 #back { | 5 #back { |
6 width: 1000px; | 6 width: 1000px; |
7 height: 600px; | 7 height: 600px; |
8 background-color: green; | 8 background-color: green; |
9 } | 9 } |
10 #front { | 10 #front { |
11 width: 800px; | 11 width: 800px; |
12 height: 400px; | 12 height: 400px; |
13 background-color: red; | 13 background-color: red; |
14 border: 50px solid blue; | 14 border: 50px solid blue; |
15 padding: 50px; | 15 padding: 50px; |
16 -webkit-mask-image: url(resources/circle-alpha.svg); | 16 -webkit-mask-image: url(resources/circle-alpha.svg); |
17 -webkit-mask-size: 121px 93px; | 17 -webkit-mask-size: 121px 93px; |
18 -webkit-mask-repeat: space space; | 18 -webkit-mask-repeat: space space; |
19 -webkit-mask-origin: content-box; | 19 -webkit-mask-origin: content-box; |
20 -webkit-mask-position: 100px 100px; /* Should be ignored because
of repeat: space */ | 20 -webkit-mask-position: 100px 100px; /* Should be ignored because
of repeat: space */ |
21 -webkit-mask-clip: content-box; | 21 -webkit-mask-clip: content-box; |
22 } | 22 } |
23 </style> | 23 </style> |
24 </head> | 24 </head> |
25 | 25 |
26 <body> | 26 <body> |
27 <div id="back"> | 27 <div id="back"> |
28 <div id="front" /> | 28 <div id="front" /> |
29 </div> | 29 </div> |
30 <script> | |
31 document.body.offsetLeft; | |
32 </script> | |
33 </body> | 30 </body> |
34 </html> | 31 </html> |
35 | 32 |
OLD | NEW |