Is that possible to make <video> mirrored?

后端 未结 4 1028
Happy的楠姐
Happy的楠姐 2020-12-08 01:59

Is that possible to make a video inside tag mirrored horizontally or vertically?

4条回答
  •  一整个雨季
    2020-12-08 02:20

    Using JavaScript, if video is the video element, to mirror (flip horizontally) you can use

    video.style.cssText = "-moz-transform: scale(-1, 1); \
    -webkit-transform: scale(-1, 1); -o-transform: scale(-1, 1); \
    transform: scale(-1, 1); filter: FlipH;";
    

    To flip vertically you can use

    video.style.cssText = "-moz-transform: scale(1, -1); \
    -webkit-transform: scale(1, -1); -o-transform: scale(1, -1); \
    transform: scale(1, -1); filter: FlipV;";
    

提交回复
热议问题