Different repeating linear gradients: - HTML CSS CSS

HTML CSS examples for CSS:Color

Description

Different repeating linear gradients:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {<!--from  www.ja  va2 s .  c  o  m-->
    height: 200px;
    background: -webkit-repeating-linear-gradient(45deg,yellow,blue,black,pink 7%,green 10%); /* For Safari 5.1 to 6.0 */
    background: -o-repeating-linear-gradient(45deg,yellow,blue,black,pink 7%,green 10%); /* For Opera 11.1 to 12.0 */
    background: -moz-repeating-linear-gradient(45deg,yellow,blue,black,pink 7%,green 10%); /* For Firefox 3.6 to 15 */
    background: repeating-linear-gradient(45deg,yellow,blue,black,pink 7%,green 10%); /* Standard syntax (must be last) */
}

#grad2 {
    height: 200px;
    background: -webkit-repeating-linear-gradient(190deg,yellow,blue,black,pink 7%,green 10%); /* For Safari 5.1 to 6.0 */
    background: -o-repeating-linear-gradient(190deg,yellow,blue,black,pink 7%,green 10%); /* For Opera 11.1 to 12.0 */
    background: -moz-repeating-linear-gradient(190deg,yellow,blue,black,pink 7%,green 10%); /* For Firefox 3.6 to 15 */
    background: repeating-linear-gradient(190deg,yellow,blue,black,pink 7%,green 10%); /* Standard syntax (must be last) */
}

#grad3 {
    height: 200px;
    background: -webkit-repeating-linear-gradient(90deg,yellow,blue,black,pink 7%,green 10%); /* For Safari 5.1 to 6.0 */
    background: -o-repeating-linear-gradient(); /* For Opera 11.1 to 12.0 */
    background: -moz-repeating-linear-gradient(90deg,yellow,blue,black,pink 7%,green 10%); /* For Firefox 3.6 to 15 */
    background: repeating-linear-gradient(90deg,yellow,blue,black,pink 7%,green 10%); /* Standard syntax (must be last) */
}
</style>
</head>
<body>

<p>A repeating gradient on 45deg axe starting red and finishing blue:</p>
<div id="grad1"></div>

<p>A repeating gradient on 190deg axe starting red and finishing blue:</p>
<div id="grad2"></div>

<p>A repeating gradient on 90deg axe starting red and finishing blue:</p>
<div id="grad3"></div>

</body>
</html>

Related Tutorials