css3背景晃動實現
阿新 • • 發佈:2018-12-03
<html>
<head>
<title>aaa</title>
</head>
<style>
.banner {
background-image: url(img/d-bg.png);
width: 562px;
height: 224px;
margin: 14px auto;
padding-top: 14px;
-webkit-animation : lzr 2s linear infinite alternate;
-moz-animation: lzr 2s linear infinite alternate;
animation: lzr 2s linear infinite alternate;
}
@-webkit-keyframes lzr {
0% {
-webkit-transform: scale(1, 1);
}
100% {
-webkit-transform : scale(1.04, 1.04);
}
}
@keyframes lzr {
0% {
transform: scale(1, 1);
}
100% {
transform: scale(1.04, 1.04);
}
}
</style>
<body>
<div class="banner"></div >
</body>
</html>