Welcome to WebmasterWorld Guest from 34.229.194.198
Forum Moderators: not2easy
p {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: #ccc;
background: -moz-linear-gradient(90deg, #ccc, #333);
background: -webkit-linear-gradient(90deg, #ccc,#333);
background: -o-linear-gradient(90deg, #ccc,#333);
background: -ms-linear-gradient(90deg, #ccc,#333);
background: linear-gradient(90deg, #ccc,#333);
}
p {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: #ccc;
background: -moz-linear-gradient(90deg, #ccc, #333);
background: -webkit-linear-gradient(90deg, #ccc,#333);
background: -o-linear-gradient(90deg, #ccc,#333);
background: -ms-linear-gradient(90deg, #ccc,#333);
background: linear-gradient(0deg, #ccc,#333);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Browser CSS Gradient Support Test</title>
<style>
.gradBox { height:40px; }
#type1 {
background-color: #ccc;
background: -moz-linear-gradient(90deg, #ccc, #333);
background: -webkit-linear-gradient(90deg, #ccc,#333);
background: -o-linear-gradient(90deg, #ccc,#333);
background: -ms-linear-gradient(90deg, #ccc,#333);
background: linear-gradient(90deg, #ccc,#333);
}
#type2 {
background-color: #ccc;
background: -moz-linear-gradient(90deg, #ccc, #333);
background: -webkit-linear-gradient(90deg, #ccc,#333);
background: -o-linear-gradient(90deg, #ccc,#333);
background: -ms-linear-gradient(90deg, #ccc,#333);
background: linear-gradient(0deg, #ccc,#333);
}
#type3 {
background-color: #ccc;
background: -moz-linear-gradient(0deg, #ccc, #333);
background: -webkit-linear-gradient(0deg, #ccc,#333);
background: -o-linear-gradient(0deg, #ccc,#333);
background: -ms-linear-gradient(0deg, #ccc,#333);
background: linear-gradient(0deg, #ccc,#333);
}
#type4 { color:#fff;
background-color: #ccc;
background: -moz-linear-gradient(-90deg, #ccc, #333);
background: -webkit-linear-gradient(-90deg, #ccc,#333);
background: -o-linear-gradient(-90deg, #ccc,#333);
background: -ms-linear-gradient(-90deg, #ccc,#333);
background: linear-gradient(-90deg, #ccc,#333);
}
#type5 {
background-color: #ccc;
background: -moz-linear-gradient(left, #ccc, #333);
background: -webkit-linear-gradient(left, #ccc,#333);
background: -o-linear-gradient(left, #ccc,#333);
background: -ms-linear-gradient(left, #ccc,#333);
background: linear-gradient(left, #ccc,#333);
}
#type6 {
background-color: #ccc;
background: -moz-linear-gradient(bottom, #ccc, #333);
background: -webkit-linear-gradient(bottom, #ccc,#333);
background: -o-linear-gradient(bottom, #ccc,#333);
background: -ms-linear-gradient(bottom, #ccc,#333);
background: linear-gradient(bottom, #ccc,#333);
}
</style>
</head>
<body>
<p id="type1" class="gradBox">Type 1: 90deg</p>
<p id="type2" class="gradBox">Type 2: 90deg vendor prefix, 0deg standards</p>
<p id="type3" class="gradBox">Type 3: 0deg</p>
<p id="type4" class="gradBox">Type 4: -90deg</p>
<p id="type5" class="gradBox">Type 5: left</p>
<p id="type6" class="gradBox">Type 6: bottom</p>
<p>In browsers where Type 2 and Type 3 have the same appearance, the browser supports the standard.</p>
<p>Browsers that support the standard measure the angle from the vertical axis moving clockwise.</p>
</body>
</html>
p { position: absolute;
left: 25%;
right: 25%;
top: 25%;
bottom: 25%;
border: 15px solid #d00;
-webkit-border-radius: 35px;
-moz-border-radius: 35px;
border-radius: 35px;
background-color: #a1cdf5; /* set a fallback colour */
background: -moz-linear-gradient(0deg, #a1cdf5, #003e76);
background: -webkit-linear-gradient(0deg, #a1cdf5,#003e76);
background: -o-linear-gradient(0deg, #a1cdf5,#003e76);
background: -ms-linear-gradient(0deg, #a1cdf5,#003e76);
background: linear-gradient(90deg, #a1cdf5,#003e76);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a1cdf5', endColorstr='#003e76',GradientType=1 ); }
if you try to adjust the -webkit rule to account for Safari, you'll be causing problems for earlier versions of Chrome