[英]Responsive Animated Background in Bootstrap?
按照此处的说明进行操作后: https : //davidwalsh.name/background-animation-css
我可以移动图片,但是我无法弄清楚如何使它响应。 关于如何使其成为可能的任何想法? 我添加了以下CSS代码:
@keyframes animatedBackground{
from {background-position: 0 0;}
to {background-position: -1920px 0;}
}
#animate-area{
width: 560px;
height: 400px;
background-image: url("images/japan.jpg");
background-position: 0px 0px;
background-repeat: repeat-x;
animation: animatedBackground 40s linear infinite;
}
在演示中, <div id="animate-area">
的宽度明确设置为560px。 尝试将其设置为width: auto;
。 这应将div宽度缩放到其容器/父级的宽度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.