简体   繁体   English

如何转换全屏HTML5视频?

[英]How to transform a fullscreen HTML5 video?

I was able to transform a normal, non-fullscreen video element with this CSS-rule: 我可以使用以下CSS规则转换正常的非全屏视频元素:

transform: rotate(9deg) !important;

However, when I put the video fullscreen, the rule gets magically overwritten by user-agent CSS-rules: 但是,当我将视频全屏显示时,该规则会被用户代理CSS规则神奇地覆盖:

用户代理CSS规则

So I guess what I am asking is if I can somehow override even the user-agent rules? 所以我想我要问的是我是否可以以某种方式甚至覆盖用户代理规则? By the looks of it the transform property is overdriven as it is strikethrough, but yet the video won't rotate. 从外观上看,transform属性因其删除线而被过度驱动,但视频不会旋转。

did you try specifying a css rule, similar to the one enforced by the browser? 您是否尝试指定了CSS规则,类似于浏览器强制执行的规则? So, looking at the pasted code above, maybe something like this: 因此,查看上面粘贴的代码,也许是这样的:

video:-webkit-full-scren {
    transform: rotate(9deg) !important;
}

I did some similar stuff for range inputs, and I successfully overwrote the default browser styles. 我为范围输入做了一些类似的工作,并且成功覆盖了默认的浏览器样式。 Maybe it works here too. 也许它在这里也可以。

Furthermore, I also did some fullscreen tweaking of similar sorts. 此外,我还做了一些类似的全屏调整。 I wanted to remove the controls when in fullscreen, since I implemented my own. 我想在全屏模式下删除控件,因为我实现了自己的控件。 I just used this and it worked: 我只是用这个,它的工作原理是:

video::-webkit-media-controls {
    display: none !important;
}

::-webkit-media-controls {
    display:none !important;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM