网页滚动右下角悬浮视频播放器

博主在尝试创建一个网页滚动时右下角保持固定的视频播放器,但在代码实现过程中遇到'Cannot read property 'top' of undefined'的错误。尽管搜索了相关解决方案,问题依然未得到解决。

但是我有一个问题一直没搞清楚,将这个代码写在一个页面中时,一直提示Cannot read property ‘top’ of undefined,我百度了一些原因但还是没有解决

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="悬浮/css/reset.min.css">
    <style>
        .ddd {
            width: 100%;
            height: 3500px;
        }
        .box {
            width: 600px;
        }
        #videoBox {
            border: 10px solid #212223;
            transition: 0.5s;
        }

        video {
            width: 100%;
            vertical-align: bottom;
        }

        #videoBox.in {
            animation: ac 1s;
        }

        #videoBox.out {
            position: fixed;
            bottom: 0;
            right: 0;
            width: 300px;
            z-index: 999;
            animation: an 0.5s;
        }
    </style>

</head>
<body>
<div id="site">
    <div id="videoBox" class="box"&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值