1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #dynamic_logo img{ filter: alpha(opacity=0);opacity:0;} #dynamic_logo{ background-repeat: no-repeat; height: 300px; width: 350px; margin-top: 50px; margin-right: 0px; z-index: -2; animation: MoveUpDown 2s ease-in-out infinite; } @keyframes MoveUpDown { 0%, 100% { top: 50px; /* 基本位置 */ } 50% { top: 100px; /* 移動多少 */ } background-image: url(圖); } |
Direct link: https://paste.plurk.com/show/8jSsepWY8U9GWQYABAFJ