[英]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.