首页 > 解决方案 > 如何创建一个按钮来镜像视频

问题描述

我需要创建一个按钮来镜像 vimeo 视频和另一个返回正常视图。我一直在尝试使用 transform: scaleX(-1)

但它不工作

我将不胜感激任何帮助谢谢:)

标签: wordpressvimeo

解决方案


尝试添加!importanttransform: scaleX(-1). 或者,
此答案可能对您有所帮助,但如果您想镜像 Vimeo 视频,那么您将不得不镜像整个 Vimeo Video iframe。

<iframe id='VimeoVideo' src="https://player.vimeo.com/video/253989945?h=c6db007fe5" width="640" height="360" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
<button onclick='document.getElementById("VimeoVideo").style.transform = "scaleX(-1)"'>Mirror Video</button>
<button onclick='document.getElementById("VimeoVideo").style.transform = "scaleX(1)"'>Back To Normal</button>


推荐阅读