小编tho*_*ton的帖子

使用CSS3动画扩展圆圈

我试图这样做,当页面加载圆圈出现,这很好,但我需要它们向外生长,从中心到小到大,而不是从左上角:

你可以看到我目前在这里:http://thomasbritton.co.uk/projects/ebrd/

理想情况下,希望这可以在CSS中完成,但如果它更容易/更稳定,可以使用JS.

有任何想法吗?

这是我的动画部分的css:

.circle a {
  border-radius: 150px;
  color: #fff;
  height: 0;
  position: absolute;
  text-decoration: none;
  width: 0;
}

.circle a.grow {
  -webkit-animation-name: grow;
  -webkit-animation-duration: 2.2s;
  -webkit-animation-timing-function: ease;
  -webkit-animation-iteration-count: 1;
  -webkit-animation-direction: normal;
  -webkit-animation-delay: 0;
  -webkit-animation-play-state: running;
  -webkit-animation-fill-mode: forwards;

  -moz-animation-name: grow;
  -moz-animation-duration: 2.2s;
  -moz-animation-timing-function: ease;
  -moz-animation-iteration-count: 1;    
  -moz-animation-direction: normal;
  -moz-animation-delay: 0;
  -moz-animation-play-state: running;
  -moz-animation-fill-mode: forwards;

  animation-name: grow;
  animation-duration: 2.2s;
  animation-timing-function: ease;
  animation-iteration-count: 1; 
  animation-direction: normal;
  animation-delay: 0;
  animation-play-state: running;
  animation-fill-mode: forwards;
}

@-webkit-keyframes grow {
  0% …
Run Code Online (Sandbox Code Playgroud)

css jquery animation css3 css-animations

2
推荐指数
1
解决办法
3万
查看次数

标签 统计

animation ×1

css ×1

css-animations ×1

css3 ×1

jquery ×1