webkit-gradient-linear-1c.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <html>
  7. <head>
  8. <title>
  9. CSS Test: -webkit-gradient(linear, ...) expressions,
  10. from the bottom-right-most end of each side to the
  11. bottom-right-most end of opposite side.
  12. </title>
  13. <style>
  14. div {
  15. border: 1px solid black;
  16. width: 100px;
  17. height: 50px;
  18. margin: 1px;
  19. float: left;
  20. /* We include a fallback background, to easily distinguish failures at
  21. * parse time (which fall back to this value) vs. something later on. */
  22. background: red;
  23. }
  24. br { clear: both; }
  25. </style>
  26. </head>
  27. <body>
  28. <!-- Left to right gradients: -->
  29. <div style="background: -webkit-gradient(linear, left bottom, right bottom,
  30. from(blue), to(yellow))"></div>
  31. <div style="background: -webkit-gradient(linear, left bottom, right bottom,
  32. from(blue),
  33. color-stop(0.3, pink),
  34. to(yellow))"></div>
  35. <br>
  36. <!-- Right to left gradients: -->
  37. <div style="background: -webkit-gradient(linear, right bottom, left bottom,
  38. from(blue), to(yellow))"></div>
  39. <div style="background: -webkit-gradient(linear, right bottom, left bottom,
  40. from(blue),
  41. color-stop(0.3, pink),
  42. to(yellow))"></div>
  43. <br>
  44. <!-- Top to bottom gradients: -->
  45. <div style="background: -webkit-gradient(linear, right top, right bottom,
  46. from(blue), to(yellow))"></div>
  47. <div style="background: -webkit-gradient(linear, right top, right bottom,
  48. from(blue),
  49. color-stop(0.3, pink),
  50. to(yellow))"></div>
  51. <br>
  52. <!-- Bottom to top gradients: -->
  53. <div style="background: -webkit-gradient(linear, right bottom, right top,
  54. from(blue), to(yellow))"></div>
  55. <div style="background: -webkit-gradient(linear, right bottom, right top,
  56. from(blue),
  57. color-stop(0.3, pink),
  58. to(yellow))"></div>
  59. </body>
  60. </html>