|
1 <!DOCTYPE> |
|
2 <head> |
|
3 <style> |
|
4 body { |
|
5 border: 0px; |
|
6 margin: 0px; |
|
7 padding: 0px; |
|
8 } |
|
9 ul { |
|
10 list-style-position: inside; |
|
11 list-style-image: url(image-exif-270-deg-flip.jpg); |
|
12 } |
|
13 </style> |
|
14 </head> |
|
15 <body> |
|
16 <ul><li></li></ul> |
|
17 |
|
18 <script> |
|
19 var orientation = location.search.substring(1).split("&"); |
|
20 var angle = orientation[0]; |
|
21 var flip = orientation[1] == "flip" ? true : false; |
|
22 |
|
23 // Construct a style. "from-image" is special-cased. |
|
24 var style; |
|
25 if (angle == "from-image") { |
|
26 style = "ul { image-orientation: from-image; }\n"; |
|
27 } else { |
|
28 style = "ul { image-orientation: " |
|
29 + angle + "deg" |
|
30 + (flip ? " flip" : "") |
|
31 + "; }\n"; |
|
32 } |
|
33 |
|
34 // Apply the style to the document. |
|
35 var sheet = document.createElement('style'); |
|
36 sheet.innerHTML = style; |
|
37 document.body.appendChild(sheet); |
|
38 </script> |
|
39 </body> |