本教程操作环境:windows10系统、css3版、DELL G3电脑css3怎么实现围绕圆心公转?CSS3动画 表情包围绕圆公转而不自转效果如图<!DOCTYPE html> <html> <head>
本教程操作环境:windows10系统、css3版、DELL G3电脑
css3怎么实现围绕圆心公转?
CSS3动画 表情包围绕圆公转而不自转
效果如图
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta Http-equiv="X-UA-Compatible" content="ie=edge">
<title>公转不自转</title>
<style>
.out {
margin-top: 200px;
margin-left: 200px;
position: relative;
height: 300px;
width: 300px;
border-radius: 150px;
background-color: sandybrown;
box-shadow: 0 0 23px;
}
.cover {
display: inline-block;
width: 50px;
height: 50px;
position: absolute;
transfORM-origin: 150px 150px;
animation: smile linear 5s infinite;
background-color: springgreen;
}
img {
width: 50px;
height: 50px;
animation: smile reverse linear 5s infinite;
}
@keyframes smile {
to {
transform: rotateZ(360deg);
}
}
.out span {
display: block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 20px;
}
</style>
</head>
<body>
<div>
<div>
<img
src="https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1577100031&di=7445f215ef1f860d45fd93be22b52f57&src=http://git.oschina.net/uploads/group/110103951448978.jpg"
alt="">
</div>
<span>和蔼的笑脸</span>
</div>
</body>
</html>
以上就是css3怎么实现围绕圆心公转的详细内容,更多请关注编程网其它相关文章!
--结束END--
本文标题: css3怎么实现围绕圆心公转
本文链接: https://lsjlt.com/news/206920.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2023-05-25
2023-05-25
2023-05-25
2023-05-25
2023-05-25
2023-05-24
2023-05-24
2023-05-24
2023-05-24
2023-05-24
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0