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

-_-#【CSS3】CSS3 gradient transition with background-position

2014-03-19 15:12 483 查看
CSS3 gradient transition with background-position

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<style>
#DemoGradient {
background: -webkit-linear-gradient(#C7D3DC,#5B798E);
background: -moz-linear-gradient(#C7D3DC,#5B798E);
background: -o-linear-gradient(#C7D3DC,#5B798E);
background: linear-gradient(#C7D3DC,#5B798E);

-webkit-transition: background 1s ease-out;
-moz-transition: background 1s ease-out;
-o-transition: background 1s ease-out;
transition: background 1s ease-out;

background-size: 1px 200px;
border-radius: 10px;
border: 1px solid #839DB0;
cursor: pointer;
width: 150px;
height: 100px;
}
#DemoGradient:hover {
background-position: 100px;
}
</style>
<div id="DemoGradient"></div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: