Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html lang="en-US"> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>test of border-image</title> |
michael@0 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
michael@0 | 6 | <meta http-equiv="Content-Style-Type" content="text/css"> |
michael@0 | 7 | <style type="text/css"> |
michael@0 | 8 | |
michael@0 | 9 | /** |
michael@0 | 10 | * This is a copy of multicolor-image-2.html with a few changes: |
michael@0 | 11 | * (1) the whole thing is inside a -moz-transform |
michael@0 | 12 | * (2) different border-images have different values for |
michael@0 | 13 | * repeat/stretch/round |
michael@0 | 14 | */ |
michael@0 | 15 | |
michael@0 | 16 | body { |
michael@0 | 17 | width: 100px; |
michael@0 | 18 | /* This transform has no scale, and thus tests pixel-snapping codepaths! */ |
michael@0 | 19 | -moz-transform: translate(100px, 100px); |
michael@0 | 20 | -moz-transform-origin: 0 0; |
michael@0 | 21 | -khtml-transform: translate(100px, 100px); |
michael@0 | 22 | -khtml-transform-origin: 0 0; |
michael@0 | 23 | transform: translate(100px, 100px); |
michael@0 | 24 | transform-origin: 0 0; |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | div { |
michael@0 | 28 | background: red; /* fail if this shows through */ |
michael@0 | 29 | background-image: url('3x3multicolor.png'); /* fail if this shows through */ |
michael@0 | 30 | margin-bottom: 2px; |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | div.one { |
michael@0 | 34 | border-image: url(10x5multicolor.png) 2 2 1 3 fill stretch; |
michael@0 | 35 | -khtml-border-image: url(10x5multicolor.png) 2 2 1 3 fill stretch; |
michael@0 | 36 | border-image: url(10x5multicolor.png) 2 2 1 3 fill stretch; |
michael@0 | 37 | border-width: 4px 6px 8px 11px; |
michael@0 | 38 | border-style: solid; |
michael@0 | 39 | width: 9px; |
michael@0 | 40 | height: 1px; |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | div.two { |
michael@0 | 44 | border-image: url(10x5multicolor.png) 40% 20% 20% 30% fill repeat; |
michael@0 | 45 | -khtml-border-image: url(10x5multicolor.png) 40% 20% 20% 30% fill repeat; |
michael@0 | 46 | border-image: url(10x5multicolor.png) 40% 20% 20% 30% fill repeat; |
michael@0 | 47 | border-width: 3px 1px 0px 4px; |
michael@0 | 48 | border-style: solid; |
michael@0 | 49 | width: 2px; |
michael@0 | 50 | height: 17px; |
michael@0 | 51 | } |
michael@0 | 52 | |
michael@0 | 53 | div.three { |
michael@0 | 54 | border-image: url(10x5multicolor.png) 40% 2 1 30% fill round; |
michael@0 | 55 | -khtml-border-image: url(10x5multicolor.png) 40% 2 1 30% fill round; |
michael@0 | 56 | border-image: url(10x5multicolor.png) 40% 2 1 30% fill round; |
michael@0 | 57 | border-width: 10px 2px 5px 3px; |
michael@0 | 58 | border-style: solid; |
michael@0 | 59 | width: 17px; |
michael@0 | 60 | height: 8px; |
michael@0 | 61 | } |
michael@0 | 62 | |
michael@0 | 63 | div.four { |
michael@0 | 64 | border-image: url(10x5multicolor.png) 2 2 20% 30% fill stretch round; |
michael@0 | 65 | -khtml-border-image: url(10x5multicolor.png) 2 2 20% 30% fill stretch round; |
michael@0 | 66 | border-image: url(10x5multicolor.png) 2 2 20% 30% fill stretch round; |
michael@0 | 67 | border-width: 5px 7px 1px 0; |
michael@0 | 68 | border-style: solid; |
michael@0 | 69 | width: 8px; |
michael@0 | 70 | height: 5px; |
michael@0 | 71 | } |
michael@0 | 72 | |
michael@0 | 73 | div.five { |
michael@0 | 74 | border-width: 4px 8px 10px 2px; |
michael@0 | 75 | border-style: solid; |
michael@0 | 76 | border-image: url(10x5multicolor.png) 40% 2 1 30% fill repeat stretch; |
michael@0 | 77 | -khtml-border-image: url(10x5multicolor.png) 40% 2 1 30% fill repeat stretch; |
michael@0 | 78 | border-image: url(10x5multicolor.png) 40% 2 1 30% fill repeat stretch; |
michael@0 | 79 | width: 0; |
michael@0 | 80 | height: 8px; |
michael@0 | 81 | } |
michael@0 | 82 | |
michael@0 | 83 | div.six { |
michael@0 | 84 | border-width: 4px 0 10px 2px; |
michael@0 | 85 | border-style: solid; |
michael@0 | 86 | border-image: url(10x5multicolor.png) 40% 2 1 30% round repeat; |
michael@0 | 87 | -khtml-border-image: url(10x5multicolor.png) 40% 2 1 30% round repeat; |
michael@0 | 88 | border-image: url(10x5multicolor.png) 40% 2 1 30% round repeat; |
michael@0 | 89 | width: 17px; |
michael@0 | 90 | height: 0; |
michael@0 | 91 | } |
michael@0 | 92 | |
michael@0 | 93 | div.seven { |
michael@0 | 94 | border-image: url(10x5multicolor.png) 40% 2 1 30% stretch repeat; |
michael@0 | 95 | -khtml-border-image: url(10x5multicolor.png) 40% 2 1 30% stretch repeat; |
michael@0 | 96 | border-image: url(10x5multicolor.png) 40% 2 1 30% stretch repeat; |
michael@0 | 97 | border-width: 1px 3px 0 0; |
michael@0 | 98 | border-style: solid; |
michael@0 | 99 | width: 17px; |
michael@0 | 100 | height: 0; |
michael@0 | 101 | } |
michael@0 | 102 | |
michael@0 | 103 | </style> |
michael@0 | 104 | </head> |
michael@0 | 105 | <body> |
michael@0 | 106 | <div class="one"></div> |
michael@0 | 107 | <div class="two"></div> |
michael@0 | 108 | <div class="three"></div> |
michael@0 | 109 | <div class="four"></div> |
michael@0 | 110 | <div class="five"></div> |
michael@0 | 111 | <div class="six"></div> |
michael@0 | 112 | <div class="seven"></div> |
michael@0 | 113 | </body> |
michael@0 | 114 | </html> |