简体   繁体   English

如何暂停和播放在网页背景上设置的 gif

[英]How can i pause and play gif which is set on webpage background

This is the code :这是代码:

enter code here
        <style type="text/css">
        body  
          {
            overflow: hidden;
            background-image:url(AU.gif) ;
            border-image-repeat: no-repeat;
            display: inline-block;
            vertical-align: top;
            background-position: center center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            margin: 60px 450px;
            background-position: center center;
            background-size: cover;
        }
       body>.grid 
        {
            height: 100%;
        }
        
        .image 
        {
            margin-top: -100px;
        }
        
        .column     
        {
            max-width: 450px;
        }

Output :输出 :

[enter image description here][1] [在此处输入图片说明][1]

------ this is GIF of my webpage ------ [1]: https://i.stack.imgur.com/GflkC.gif ------ 这是我网页的 GIF ------ [1]: https://i.stack.imgur.com/GflkC.gif

Now , I want to do umm when any user open this webpage then the GIF aniamation stop at that GIF first state(which is we can see all kind of lines and Dots) and pause there in current position after user enter write login creds then this GIF animation continue and go to its last state (which is we can see GIF animation become invisible).现在,我想在任何用户打开此网页时执行 umm 然后 GIF 动画停止在该 GIF 第一个状态(这是我们可以看到所有类型的线条和点)并在用户输入写入登录凭据后在当前位置暂停然后这个GIF 动画继续并进入它的最后状态(我们可以看到 GIF 动画变得不可见)。 So that kind of any css attribute or JS code possible or not ?那么这种任何 css 属性或 JS 代码是否可能? Thank you in advance.先感谢您。

暂停和播放 gif 是不可能的,但是当使用 javascript 有视频而不是 gif 时是可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM