我想创建这种效果,让圆圈同时向左和向右扩展。我在另一篇文章的回答中看到了这个答案:https://stackoverflow.com/a/29922969
这是他们的答案中重现的代码:
.logo {
width: 100px;
height: 100px;
border-radius: 50px;
background: red;
transition: width 2s;
}
.logo:hover {
width: 300px;
}
<div class="logo"></div>
这正是我想要的效果,只不过它应该从中心扩展而不是从左到右扩展。
我尝试借助人工智能,但它甚至无法做到,只能根据提供的答案重现相同的效果,但不是从中心到左到右。