Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 278 lines (254 sloc) 13.54 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
<!DOCTYPE html>

<html>
<head>
    <title>Tests for background gradients</title>

    <style type="text/css">

        html { -pie-load-path: "../build"; }

        .section {
            display: block;
            border: 1px solid #CCC;
            margin: 2em 1em;
            overflow: hidden;
            background:url(border.png);
            position: relative;
            z-index: 0;
            zoom: 1;
        }

        h1 {
            font-size: 1em;
            margin: 1em;
        }

        p {
            float: left;
            padding: 1em;
            width: 15%;
            height: 8em;
            border: 1px solid;
            margin: 1em;
            color: #000;
            text-shadow: #FFF 0 0 2px;
            -moz-border-radius: 1em;
            -webkit-border-radius: 1em;
            border-radius: 1em;
            behavior: url(../build/PIE.htc);
        }

        #vert1 {
            background: -webkit-gradient(linear, left top, left bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(top, yellow, blue);
            -pie-background: linear-gradient(top, yellow, blue);
        }
        #vert2 {
            background: -webkit-gradient(linear, left bottom, left top, from(blue), to(yellow));
            background: -moz-linear-gradient(bottom, blue, yellow);
            -pie-background: linear-gradient(bottom, blue, yellow);
        }
        #vert3 {
            background: -webkit-gradient(linear, left top, left bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(-90deg, yellow, blue);
            -pie-background: linear-gradient(-90deg, yellow, blue);
        }
        #vert4 {
            background: -webkit-gradient(linear, left top, left bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(270deg, yellow, blue);
            -pie-background: linear-gradient(270deg, yellow, blue);
        }
        #vert5 {
            background: -webkit-gradient(linear, left top, left bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(top, yellow 0%, blue 100%);
            -pie-background: linear-gradient(top, yellow 0%, blue 100%);
        }
        #vert6 {
            background: -webkit-gradient(linear, left top, left bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(center top, yellow, blue);
            -pie-background: linear-gradient(center top, yellow, blue);
        }
        #vert7 {
            background: -webkit-gradient(linear, left top, left bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(yellow, blue);
            -pie-background: linear-gradient(yellow, blue);
        }

        #horiz1 {
            background: -webkit-gradient(linear, left top, right top, from(yellow), to(blue));
            background: -moz-linear-gradient(left, yellow, blue);
            -pie-background: linear-gradient(left, yellow, blue);
        }
        #horiz2 {
            background: -webkit-gradient(linear, right top, left top, from(blue), to(yellow));
            background: -moz-linear-gradient(right, blue, yellow);
            -pie-background: linear-gradient(right, blue, yellow);
        }
        #horiz3 {
            background: -webkit-gradient(linear, left top, right top, from(yellow), to(blue));
            background: -moz-linear-gradient(0, yellow, blue);
            -pie-background: linear-gradient(0, yellow, blue);
        }
        #horiz4 {
            background: -webkit-gradient(linear, left top, right top, from(yellow), to(blue));
            background: -moz-linear-gradient(360deg, yellow, blue);
            -pie-background: linear-gradient(360deg, yellow, blue);
        }
        #horiz5 {
            background: -webkit-gradient(linear, left top, right top, from(yellow), to(blue));
            background: -moz-linear-gradient(left, yellow 0%, blue 100%);
            -pie-background: linear-gradient(left, yellow 0%, blue 100%);
        }
        #horiz6 {
            background: -webkit-gradient(linear, left top, right top, from(yellow), to(blue));
            background: -moz-linear-gradient(left center, yellow, blue);
            -pie-background: linear-gradient(left center, yellow, blue);
        }


        #diag1 {
            background: -webkit-gradient(linear, left top, right bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(top left, yellow, blue);
            -pie-background: linear-gradient(top left, yellow, blue);
        }
        #diag2 {
            background: -webkit-gradient(linear, left top, right bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(0 0, yellow, blue);
            -pie-background: linear-gradient(0 0, yellow, blue);
        }
        #diag3 {
            background: -webkit-gradient(linear, left top, right bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(top 0px left 0px, yellow, blue);
            -pie-background: linear-gradient(top 0px left 0px, yellow, blue);
        }
        #diag4 {
            background: -webkit-gradient(linear, right bottom, left top, from(blue), to(yellow));
            background: -moz-linear-gradient(bottom right, blue, yellow);
            -pie-background: linear-gradient(bottom right, blue, yellow);
        }
        #diag5 {
            background: -webkit-gradient(linear, left top, right bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(-45deg, yellow, blue);
            -pie-background: linear-gradient(-45deg, yellow, blue);
        }
        #diag6 {
            background: -webkit-gradient(linear, left top, right bottom, from(yellow), to(blue));
            background: -moz-linear-gradient(315deg, yellow, blue);
            -pie-background: linear-gradient(315deg, yellow, blue);
        }


        #multi1 {
            background: -webkit-gradient(linear, left top, left bottom, from(yellow), color-stop(0.2, blue), to(#0f0));
            background: -moz-linear-gradient(top, yellow, blue 20%, #0f0);
            -pie-background: linear-gradient(top, yellow, blue 20%, #0f0);
        }
        #multi2 {
            background: -webkit-gradient(linear, left top, right top, from(yellow), color-stop(0.2, blue), to(#0f0));
            background: -moz-linear-gradient(left, yellow, blue 20%, #0f0);
            -pie-background: linear-gradient(left, yellow, blue 20%, #0f0);
        }
        #multi3 {
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0.3, yellow), color-stop(0.5, blue), color-stop(0.7, green));
            background: -moz-linear-gradient(top, yellow 30%, blue 50%, green 70%);
            -pie-background: linear-gradient(top, yellow 30%, blue 50%, green 70%);
        }
        #multi4 {
            background: -webkit-gradient(linear, left top, right top, color-stop(0.5, yellow), color-stop(0.75, blue), to(green));
            background: -moz-linear-gradient(left, yellow 50%, blue, green);
            -pie-background: linear-gradient(left, yellow 50%, blue, green);
        }
        #multi5 {
            background: -webkit-gradient(linear, left top, right top, from(aqua), color-stop(.0667, black), color-stop(.1333, blue), color-stop(.2, fuchsia), color-stop(.2667, gray), color-stop(.3333, green), color-stop(.4, lime), color-stop(.4667, maroon), color-stop(.5333, navy), color-stop(.6, olive), color-stop(.6667, purple), color-stop(.7333, red), color-stop(.8, silver), color-stop(.8667, teal), color-stop(.9333, white), to(yellow));
            background: -moz-linear-gradient(left, aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow );
            -pie-background: linear-gradient(left, aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow );
        }
        #multi6 {
            background: -webkit-gradient(linear, left bottom, right top, from(red), color-stop(0.333, yellow), color-stop(.667, green), to(blue));
            background: -moz-linear-gradient(45deg, red, yellow, green, blue);
            -pie-background: linear-gradient(45deg, red, yellow, green, blue);
        }

        #lineup p {
            border: 0;
            width: 40%;
            height: 50px;
            margin-right: 0;
            border-radius: 0;
            background: -moz-linear-gradient(center bottom,rgb(170,222,249) 0%,rgb(63,158,210) 100%);
            -pie-background: linear-gradient(center bottom,rgb(170,222,249) 0%,rgb(63,158,210) 100%);
        }
        #lineup2 {
            margin-left: 0;
        }


        #opacity {
            background: url(background2.gif);
        }
        #opacity1 {
            background: -webkit-linear-gradient(top, rgba(0, 0, 255, 1), rgba(0, 0, 255, 0.2));
            background: -moz-linear-gradient(top, rgba(0, 0, 255, 1), rgba(0, 0, 255, 0.2));
            background: -ms-linear-gradient(top, rgba(0, 0, 255, 1), rgba(0, 0, 255, 0.2));
            background: -o-linear-gradient(top, rgba(0, 0, 255, 1), rgba(0, 0, 255, 0.2));
            -pie-background: linear-gradient(top, rgba(0, 0, 255, 1), rgba(0, 0, 255, 0.2));
        }
        #opacity1:hover {
            background: -webkit-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.8));
            background: -moz-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.8));
            background: -ms-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.8));
            background: -o-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.8));
            -pie-background: linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.8));
        }
        #opacity2 {
            background: -webkit-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            background: -moz-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            background: -ms-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            background: -o-linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            -pie-background: linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
        }
        #opacity2:hover {
            background: -webkit-linear-gradient(left, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            background: -moz-linear-gradient(left, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            background: -ms-linear-gradient(left, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            background: -o-linear-gradient(left, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
            -pie-background: linear-gradient(left, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1));
        }


    </style>
</head>
<body>

    <div class="section" id="vertTests">
        <h1>Basic vertical linear gradient</h1>
        <p id="vert1">linear-gradient( top, yellow, blue);</p>
        <p id="vert2">linear-gradient( bottom, blue, yellow);</p>
        <p id="vert3">linear-gradient( -90deg, yellow, blue);</p>
        <p id="vert4">linear-gradient( 270deg, yellow, blue);</p>
        <p id="vert5">linear-gradient( top, yellow 0%, blue 100%);</p>
        <p id="vert6">linear-gradient( center top, yellow, blue);</p>
        <p id="vert7">linear-gradient( yellow, blue);</p>
    </div>

    <div class="section" id="horizTests">
        <h1>Basic horizontal linear gradient</h1>
        <p id="horiz1">linear-gradient( left, yellow, blue);</p>
        <p id="horiz2">linear-gradient( right, blue, yellow);</p>
        <p id="horiz3">linear-gradient( 0, yellow, blue);</p>
        <p id="horiz4">linear-gradient( 360deg, yellow, blue);</p>
        <p id="horiz5">linear-gradient( left, yellow 0%, blue 100%);</p>
        <p id="horiz6">linear-gradient( left center, yellow, blue);</p>
    </div>

    <div class="section" id="diagTests">
        <h1>Basic diagonal linear gradient</h1>
        <p id="diag1">linear-gradient(top left, yellow, blue);</p>
        <p id="diag2">linear-gradient(0 0, yellow, blue);</p>
        <p id="diag3">linear-gradient(top 0px left 0px, yellow, blue);</p>
        <p id="diag4">linear-gradient(bottom right, blue, yellow);</p>
        <p id="diag5">linear-gradient(-45deg, yellow, blue);</p>
        <p id="diag6">linear-gradient(315deg, yellow, blue);</p>
    </div>

    <div class="section" id="multiStopTests">
        <h1>Multiple color stops along linear gradient</h1>
        <p id="multi1">linear-gradient(top, yellow, blue 20%, #0f0)</p>
        <p id="multi2">linear-gradient(left, yellow, blue 20%, #0f0)</p>
        <p id="multi3">linear-gradient(top, yellow 30%, blue 50%, green 70%)</p>
        <p id="multi4">linear-gradient(left, yellow 50%, blue, green)</p>
        <p id="multi5">linear-gradient(left, aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow );</p>
        <p id="multi6">linear-gradient(45deg, red, yellow, green, blue);</p>
    </div>

    <div class="section" id="lineup">
        <h1>Lining up (<a href="http://github.com/lojjic/PIE/issues/issue/64">issue 64</a>)</h1>
        <p id="lineup1">element 1</p>
        <p id="lineup2">element 2</p>
    </div>

    <div class="section" id="opacity">
        <h1>Color-stop opacity</h1>
        <p id="opacity1">linear-gradient(top, rgba(0, 0, 255, 1), rgba(0, 0, 255, 0.2))</p>
        <p id="opacity2">linear-gradient(top, rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 1))</p>
    </div>

</body>
</html>
Something went wrong with that request. Please try again.