简体   繁体   English

将音量面板向右对齐

[英]Align volume panel to right

I need to align volumePanel to the right corner.我需要将 volumePanel 对齐到右上角。 It seems API hasn't this functionality, so, I've done a lot of attempts on CSS, but it doesn't want to move :( I've built a ready-to-work template at codesandbox. Help me, please.似乎API没有这个功能,所以,我在CSS上做了很多尝试,但它不想移动:(我在codesandbox建立了一个准备工作的模板。请帮助我.

Add this CSS rule to set the volumePanel to the right.添加此 CSS 规则以将 volumePanel 设置为右侧。 As this is a component, make sure you don't use a scoped style tag but a regular style tag由于这是一个组件,请确保您不使用作用域样式标记,而是使用常规样式标记

<style>
  .vjs-control-bar {
     display: flex;
     justify-content: end;
}
</style>

You should get this result你应该得到这个结果

You must create your own custom skin to place elements as you wish and style them as you wish.您必须创建自己的自定义皮肤以根据需要放置元素并根据需要设置样式。 VideoJS has a documentation for that and there are plenty of websites that let you customize a skin. VideoJS 对此有一个文档,并且有很多网站可以让您自定义皮肤。

see this : https://www.scriptsmashup.com/Video_Skin_Generator/Videojs/videojs-skin-generator.html看到这个: https ://www.scriptsmashup.com/Video_Skin_Generator/Videojs/videojs-skin-generator.html

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

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