<!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>
背景漸變 兼容IE
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.