gecko-dev/layout/reftests/css-calc/background-linear-gradient-...

33 строки
1.0 KiB
HTML

<!DOCTYPE html>
<title>Test Bug 594935 - support calc() on gradient stop positions</title>
<style>
div {
width:100px;
height:100px;
background:red;
margin:5px 0 0 5px;
float:left;
}
div#one {
background: -moz-linear-gradient(lime 0px, lime -moz-calc(100% - 10px), blue -moz-calc(100% - 10px), blue 100%);
}
div#two {
background: -moz-linear-gradient(blue -moz-calc(100% - 100px) ,green -moz-calc(10% + 20px) ,red 40px ,white -moz-calc(100% - 40px) , lime 80px);
}
div#three {
background: -moz-linear-gradient(blue -moz-calc(0px) ,purple -moz-calc(20%) ,red -moz-calc(10px + 10px + 20px) ,blue -moz-calc(30% + 30px) , lime -moz-calc(180% - 100px));
}
div#four {
background: -moz-linear-gradient(blue -moz-calc(0% + 0px) ,green -moz-calc(10% + 20px) ,red 40px ,blue -moz-calc(200% / 2 - 40px) , yellow 80px);
}
div#five {
background: -moz-linear-gradient(red -moz-calc(100% - 100px) ,green -moz-calc(10% + 20px));
}
</style>
<div id="one">1</div>
<div id="two">2</div>
<div id="three">3</div>
<div id="four">4</div>
<div id="five">5</div>