创作性质
转载
文章关键词
文章来源
https://tehnoblog.org/how-to-create-simple-html-video-files-download-page/
博文内容-公开
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="UTF-8"/>
<meta content="True" name="HandheldFriendly"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=4.0, user-scalable=yes" />
<meta name="viewport" content="width=device-width"/>
<title>DOWNLOAD MP4 VIDEOS</title>
<style>
p{font-size:22px;font-weight:700;}
</style>
</head>
<body>
<p><a href="video1.mp4" download>1. DOWNLOAD #1 VIDEO</a></p>
<p><a href="video2.mp4" download>2. DOWNLOAD #2 VIDEO</a></p>
</body>
</html>
上面的整个技巧是在锚元素中使用HTML5 下载属性(以及可选的target =“ _ blank”),以防止直接在台式机和Android或iOS(iPhone)设备上的Chrome浏览器中流式传输文件。
您以后可以使用CSS设置样式,添加自定义缩略图/图像保持器以获取链接,不添加链接。
适用drupal版本
Drupal 8