【发布时间】:2013-06-26 23:09:29
【问题描述】:
我试图用 Body 标签做一个 CSS 背景动画。这是代码
body
{
animation-name:mymove;
animation-duration:5s;
animation-direction:alternate;
animation-iteration-count:infinite;
-webkit-animation-name:mymove;
-webkit-animation-duration:5s;
-webkit-animation-direction:alternate;
-webkit-animation-iteration-count:infinite;
}
@keyframes mymove
{
from {background-image:url('Space.png');}
to {background:blue;}
}
@-webkit-keyframes mymove
{
from {background-image:url('Space.png');}
to {background:blue;}
}
但是当我使用它时,背景只是从白色变为蓝色。图片显示不出来有什么原因吗?顺便说一下,如果我将其设置为背景图像,图像目录是正确的并且可以工作。
【问题讨论】:
-
这是 html
标题> -
使用
edit按钮为问题添加更多内容。这样您就可以正确格式化它。
标签: image css animation background