问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>原神攻略站</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="home">
<div class="nav">
<div class="logo">
<img src="images/Logo (2).jpg" width="150px" height="100px">
</div>
<div class="menu">
<ul>
<li><a href="https://ys.mihoyo.com/main/" target="_new">官网</a></li>
<li><a href="" target="_new">米游社</a></li>
<li><a href="" target="_new">B站</a></li>
<li><a href="" target="_new">团队信息</a></li>
</ul>
</div>
</div>
<div class="player">
<video src="video/蒙德.mp4" autoplay loop muted></video>
</div>
</div>
</body>
</html>
html,body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.home {
width: 100%;
height: 100%;
/*display: flex; 弹性盒子*/
/*align-items: center; 居中对齐*/
/*justify-content: center; 水平对齐弹性项目*/
}
.nav {
background-color: black;
width: 100%;
height: 100px;
opacity: 0.5;
position: absolute;
}
.player {
width: 100%;
height: 100%;
}
.player video {
width: 100%;
height: 100%;
object-fit: fill;
}
运行结果及报错内容
点击超链接失败,但是在HBuilder X软件就可以点击,好怪。
我的解答思路和尝试过的方法
不使用视频背景就可以进入超链接