css3实现360度旋转的圆

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>旋转</title>
</head>
<style>
.wrapper{
	width: 600px;
	height:600px;
	background: #F8F8F8;
	display: flex;
	justify-content: center;
	align-items: center;
}

.z{
	display: inline-block;
	height: 40px;
	width: 40px;
	text-align: center;
	background: red;
	background: #F8F8F8;
	color: #FFF;
    border-radius: 100%;
    margin: 6px;
    border: 2px solid #666;
    border-bottom-color: transparent;
    vertical-align: middle;
    -webkit-animation: rotate 0.75s linear infinite;
    animation: rotate 0.75s linear infinite;
}
@-webkit-keyframes rotate {
    0% {
        -webkit-transform: rotate(0deg);
    }
    50% {
        -webkit-transform: rotate(180deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
    }
}
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
</style>
<body>
	<div class="wrapper">
		<div class="z">
			zou
		</div>
	</div>
</body>
</html>

 


版权声明:本文为weixin_37742709原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。