利用JS控制插入视频的播放/暂停/快进等功能
1、页面样式
2、HTML代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<!-- 内部样式 -->
<style>
p{
width:400px;
height:400px;
position: absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
margin: 0px;
background-color: red;
display: flex;
justify-content: center;
align-items: center;
}
span{
display: inline-block;
cursor: pointer;
}
section{
width: 960px;
height: 544px;
position: relative;
}
body{
margin: 0px;
}
</style>
<body>
<section>
<!-- poster:插入封面图片 -->
<video src