首发网站 天风的人工智能小站
一、新建记事本把下面代码粘贴进去
1、圣诞树代码第一种
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>AE-圣诞树</title>
<style>
html,body{
margin: 0;
width:200%;
height: 200%;
}
#main{
position: absolute;
top: 0;
left: 0;
}
#video1{
width:100%;
height:100%;
}
.hidden{
display:none;
}
</style>
</head>
<body>
<div id="main">
<video id="video1" muted="muted" autoplay="autoplay" loop="loop" src="https://tianfeng.space/wp-content/uploads/2022/12/圣诞树1.mp4">
</video>
</div>
</body>
<script type="text/javascript">
$(function(){
var video = document.getElementById("video1");
video.src = "";
video.play();
});
</script>
</html>
2、圣诞树代码第二种
<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>AE-圣诞树</title><style>html,body{margin: 0;width:100%;height: 100%;}#main{position: absolute;top: 0;left: 0;}#video1{width:100%;height:100%;}.hidden{display:none;}</style></head><body><divid="main"><videoid="video1"muted="muted"autoplay="autoplay"loop="loop"src="https://tianfeng.space/wp-content/uploads/2022/12/1.mp4"></video></div></body><scripttype="text/javascript">$(function(){var video = document.getElementById("video1");
video.src ="";
video.play();});</script></html>
3、修改记事本后缀为html
4、点击文件查看效果
本文转载自: https://blog.csdn.net/weixin_62403633/article/details/128341347
版权归原作者 Tian-Feng 所有, 如有侵权,请联系我们删除。
版权归原作者 Tian-Feng 所有, 如有侵权,请联系我们删除。