|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <title>Background attribute tests</title> |
| 5 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 6 | + <script type="text/javascript" src="../../test.js"></script> |
| 7 | + <style> |
| 8 | + html { |
| 9 | + background-color: red; |
| 10 | + } |
| 11 | + body { |
| 12 | + background-color: lime; |
| 13 | + } |
| 14 | + .small div{ |
| 15 | + width:100px; |
| 16 | + height:100px; |
| 17 | + float:left; |
| 18 | + margin:10px; |
| 19 | + border:1px solid #000; |
| 20 | + } |
| 21 | + |
| 22 | + .medium div{ |
| 23 | + width:200px; |
| 24 | + height:200px; |
| 25 | + float:left; |
| 26 | + margin:10px; |
| 27 | + border:1px solid #000; |
| 28 | + } |
| 29 | + |
| 30 | + .small, .medium{ |
| 31 | + clear:both; |
| 32 | + } |
| 33 | + |
| 34 | + div{ |
| 35 | + display:block; |
| 36 | + } |
| 37 | + |
| 38 | + .linearGradient { |
| 39 | + /*background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(255, 0, 0)), to(rgb(0, 0, 255)));*/ |
| 40 | + background: -webkit-linear-gradient(top left, #f00, #00f, #BADA55, rgba(0, 0, 255,0.5)); |
| 41 | + background: -moz-linear-gradient(top right, #f00, #00f, #BADA55, rgba(0, 0, 255,0.5)); |
| 42 | + } |
| 43 | + |
| 44 | + .linearGradient2 { |
| 45 | + background: -webkit-gradient(linear, 0% 0, 0% 100%, from(rgb(252, 252, 252)), to(rgb(232, 232, 232))); |
| 46 | + } |
| 47 | + |
| 48 | + .linearGradient3 { |
| 49 | + /* FF 3.6+ */ |
| 50 | + background: -moz-linear-gradient(left, #ff0000, #ffff00, #00ff00); |
| 51 | + /* Chrome,Safari4+ */ |
| 52 | + background: -webkit-gradient(linear, left top, right top, color-stop(#ff0000), color-stop(#ffff00), color-stop(#00ff00)); |
| 53 | + /* Chrome 10+, Safari 5.1+ */ |
| 54 | + background: -webkit-linear-gradient(left, #ff0000, #ffff00, #00ff00); |
| 55 | + /* Opera 11.10+ */ |
| 56 | + background: -o-linear-gradient(left, #ff0000, #ffff00, #00ff00); |
| 57 | + /* IE 10+ */ |
| 58 | + background: -ms-linear-gradient(left, #ff0000, #ffff00, #00ff00); |
| 59 | + /* W3C */ |
| 60 | + background: linear-gradient(left, #ff0000, #ffff00, #00ff00); |
| 61 | + } |
| 62 | + |
| 63 | + .linearGradient4 { |
| 64 | + /* FF 3.6+ */ |
| 65 | + background: -moz-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%); |
| 66 | + /* Chrome, Safari 4+ */ |
| 67 | + background: -webkit-gradient(linear, left top, right top, color-stop(0%, #cedbe9), color-stop(17%, #aac5de), color-stop(50%, #6199c7), color-stop(51%, #3a84c3), color-stop(59%, #419ad6), color-stop(71%, #4bb8f0), color-stop(84%, #3a8bc2), color-stop(100%, #26558b)); |
| 68 | + /* Chrome 10+, Safari 5.1+ */ |
| 69 | + background: -webkit-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%); |
| 70 | + /* Opera 11.10+ */ |
| 71 | + background: -o-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%); |
| 72 | + /* IE10+ */ |
| 73 | + background: -ms-linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%); |
| 74 | + /* W3C */ |
| 75 | + background: linear-gradient(left, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%); |
| 76 | + } |
| 77 | + |
| 78 | + .linearGradient5 { |
| 79 | + /* FF 3.6+ */ |
| 80 | + background: -moz-linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%); |
| 81 | + /* Chrome, Safari 4+ */ |
| 82 | + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f0b7a1), color-stop(50%, #8c3310), color-stop(51%, #752201), color-stop(100%, #bf6e4e)); |
| 83 | + /* Chrome 10+, Safari 5.1+ */ |
| 84 | + background: -webkit-linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%); |
| 85 | + /* Opera 11.10+ */ |
| 86 | + background: -o-linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%); |
| 87 | + /* IE 10+ */ |
| 88 | + background: -ms-linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%); |
| 89 | + /* W3C */ |
| 90 | + background: linear-gradient(top, #f0b7a1 0%, #8c3310 50%, #752201 51%, #bf6e4e 100%); |
| 91 | + } |
| 92 | + |
| 93 | + </style> |
| 94 | + |
| 95 | + </head> |
| 96 | + <body> |
| 97 | + <div class="medium"> |
| 98 | + <div class="linearGradient"> </div> |
| 99 | + <div class="linearGradient2"> </div> |
| 100 | + <div class="linearGradient3"> </div> |
| 101 | + <div class="linearGradient4"> </div> |
| 102 | + <div class="linearGradient5"> </div> |
| 103 | + </div> |
| 104 | + </body> |
| 105 | +</html> |
0 commit comments