繁体   English   中英

如何创建动画图像的下载链接

[英]how to create download link of animated images

最近,我使用SPAN ans Marquee标签在html中创建了动画图像。 现在,我想为此图像创建下载链接,但是我不知道该怎么做? 请任何人帮我...

这是我的在线项目

 <html> <head> <title> Marquee </title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="figure"> <img src="a.jpg" name="images"/> <div class="figcaption"> <span> <h2> Believe In Your Self!!!</h2> <span class='spacer'></span> <br /> <span class='spacer' align='right'></span> <h3><marquee>By: Ajay Rathod</marquee></h3> </span> </div> </div> </body> </html> 

h3
{
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
   color: white;
    background: black; /* fallback */
    background: rgba(0, 0, 0, 0.7);
    padding: .5em;
}
#figure { 
  position: relative; 
}
#figure img { 
    display: block; /* removes trailing whitespace */
    outline: solid #000 1px;
    width:100%;
} 
.figcaption {
  position: absolute;
  bottom: 10%;
  width: 501px;
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 200%;
  text-transform: capitalize;
  }
.figcaption span h2{
     color: white;
    background: black; /* fallback */
    background: rgba(0, 0, 0, 0.7);
    padding: .5em;

    &.spacer {
      padding: 0 5px;
      background: transparent;

    &::before { content: " "; } 
        }
.figcaption span h3{
    color: white;
    background: black; /* fallback */
    background: rgba(0, 0, 0, 0.7);
    padding: .5em;

    &.spacer {
      padding: 0 5px;
      background: transparent;

    &::before { content: " "; } 

    }

您可以通过执行以下操作将任何图像制作为可下载链接

<a download="name.jpg" href="Image-Path" title="Image-Name">
 <img src="a.jpg" name="images"/>
</a>

请参阅此链接以了解浏览器兼容性

暂无
暂无

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

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