blob: bcef22a36f7da4a616a19f179488b1b752289fd1 [file] [log] [blame]
<style>
.box {
display: inline-block;
height: 120px;
width: 200px;
margin: 10px;
border: 1px solid black;
background-repeat: no-repeat;
}
.gradient1 {
background-image: -webkit-radial-gradient(50px 50%, circle closest-side, white, black);
background-image: -moz-radial-gradient(50px 50%, circle closest-side, white, black);
}
.gradient2 {
background-image: -webkit-radial-gradient(20px 50px, ellipse closest-corner, white, black);
background-image: -moz-radial-gradient(20px 50px, ellipse closest-corner, white, black);
}
.gradient3 {
background-image: -webkit-radial-gradient(20% 20%, circle closest-corner, white, black);
background-image: -moz-radial-gradient(20% 20%, circle closest-corner, white, black);
}
.gradient4 {
background-image: -webkit-radial-gradient(left, circle cover, red, green 30%, blue);
background-image: -moz-radial-gradient(left, circle cover, red, green 30%, blue);
}
.gradient5 {
background-image: -webkit-radial-gradient(ellipse cover, red, green 80px, blue);
background-image: -moz-radial-gradient(ellipse cover, red, green 80px, blue);
}
.gradient6 {
background-image: -webkit-radial-gradient(circle cover, red 20%, green, blue 150%);
background-image: -moz-radial-gradient(circle cover, red 20%, green, blue 150%);
}
.gradient7 {
background-image: -webkit-radial-gradient(20% 20%, circle closest-corner, red -50%, green, blue 150%);
background-image: -moz-radial-gradient(20% 20%, circle closest-corner, red -50%, green, blue 150%);
}
.gradient8 {
background-image: -webkit-radial-gradient(circle closest-side, red, green 40px, blue);
background-image: -moz-radial-gradient(circle closest-side, red, green 40px, blue);
}
</style>
<body>
<div class="gradient1 box"></div>
<div class="gradient2 box"></div>
<div class="gradient3 box"></div>
<br>
<div class="gradient4 box"></div>
<div class="gradient5 box"></div>
<div class="gradient6 box"></div>
<br>
<div class="gradient7 box"></div>
<div class="gradient8 box"></div>
</body>