您的位置:首页 > Web前端 > JavaScript

背景渐变 兼容IE

2015-06-20 17:48 591 查看
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>CSS 实现元素背景渐变</title>
<style>
.demo {
width:100%;
height:200px;
border:solid 1px #213c7c;
background: -webkit-gradient(linear, 0 0, 0 100%, from(#80c1e7), to(#213c7c));
background: -webkit-linear-gradient(left, #80c1e7, #213c7c);
background: -moz-linear-gradient(left, #80c1e7, #213c7c);
background: -o-linear-gradient(left, #80c1e7, #213c7c);
background: -ms-linear-gradient(left, #80c1e7, #213c7c);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr = #80c1e7, endColorstr = #213c7c);
}
</style>
</head>
<body>
<div class="demo"></div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息