| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <style> |
| .box { |
| display: inline-block; |
| height: 120px; |
| width: 200px; |
| margin: 10px; |
| border: 1px solid black; |
| background-repeat: no-repeat; |
| } |
| |
| .linear1 { |
| background-image: linear-gradient(white, black); |
| } |
| |
| .linear2 { |
| background-image: linear-gradient(to top left, white, black); |
| } |
| |
| .linear3 { |
| background-image: linear-gradient(45deg, white, black); |
| } |
| |
| .linear4 { |
| background-image: linear-gradient(-45deg, white, black); |
| } |
| |
| .linear5 { |
| background-image: linear-gradient(540deg, white, black); |
| } |
| |
| .linear6 { |
| background-image: linear-gradient(to top left, white -20%, black 120%); |
| } |
| |
| .linear7 { |
| background-image: linear-gradient(to top left, white -20px, black 120px); |
| } |
| |
| .linear8 { |
| background-image: linear-gradient(to top left, white -20%, blue, black 120%); |
| } |
| |
| .linear9 { |
| background-image: linear-gradient(0deg, white -20%, blue, black 120%); |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| var dumpPixels = true; |
| testRunner.dumpAsText(dumpPixels); |
| } |
| </script> |
| </head> |
| <body> |
| |
| <div class="linear1 box"></div> |
| <div class="linear2 box"></div> |
| <div class="linear3 box"></div> |
| <br> |
| <div class="linear4 box"></div> |
| <div class="linear5 box"></div> |
| <div class="linear6 box"></div> |
| <br> |
| <div class="linear7 box"></div> |
| <div class="linear8 box"></div> |
| <div class="linear9 box"></div> |
| |
| </body> |
| </html> |