我正在将视频(来自 Vimeo)嵌入到我的调查中。我正在使用来自 Vimeo 的响应式嵌入代码。在我的手机上观看时看起来很棒,但是在我的笔记本电脑上观看时它会占据整个屏幕。
有没有办法让它保持响应,以便在移动设备上查看时它保持相同的大小,但在笔记本电脑上时它是一半大小?
这是我正在使用的来自 Vimeo 的响应式嵌入代码:
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/581420395?badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;" title="Neck Flexion Test"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
固定嵌入代码:
<iframe src="https://player.vimeo.com/video/581420395?badge=0&autopause=0&player_id=0&app_id=58479" width="1920" height="1080" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen title="Neck Flexion Test"></iframe>