我刚刚开始编码,遇到了一个很明显需要解决的问题。
为了给我的网站制作动画,我决定使用 jQuery https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js编写一个 Javascript 代码 。
代码的第一部分对我有用:我点击“悬停我”和视频弹出窗口。都好。
这是我的代码:
<meta name="viewport" content="initial-scale=1, height=device-height, width=device-width, maximum-scale=1">
<div class="example-text">
I Wanted to test a video autoplay on hover, using javascript & this time is finally worked, thanks codepen, I appreciated. Want to try? I Wanted to test a video autoplay on hover, using javascript & this time is finally worked, thanks codepen, Want to try?
<!-- example-hoverVideo strip -->
<a class="hover-popup">Hover Me
<img class="camera-vector" src="https://www.matteogiordano.info/svg/video-camera-2.svg">
</a>
<section class="popup-container">
<div class="popup-box-2">
<div class="popup-box">
<video poster="https://intmagic-wordpress.s3.amazonaws.com/mamag/uploads/802500821_1280x720.jpg" playsinline="" autoplay="" muted="" loop="" >
<source src="https://player.vimeo.com/external/351032574.hd.mp4?s=b11ffe2804304867bd86bd956411f61ac45f1840&profile_id=174&oauth2_token_id=1204276317" type="video/mp4">
</video>
</div>
</div>
</div>
</section>
如您所见,我现在要做的是在鼠标再次单击视频时使视频淡出。我恳请是否有人可以教我这个活动以使其发挥作用。
慕容森
Smart猫小萌
人到中年有点甜
相关分类