【问题标题】:How to hide the current time tooltip in videojs v5?如何在 videojs v5 中隐藏当前时间工具提示?
【发布时间】:2015-10-30 12:55:26
【问题描述】:

我想在 videojs v5 中隐藏当前时间工具提示。它可以在 css 中使用.video-js .vjs-progress-control .vjs-play-progress:after 来识别。但是,隐藏它也会隐藏进度条的已完成部分。

有没有办法只隐藏当前时间工具提示?

【问题讨论】:

    标签: video.js


    【解决方案1】:

    这对我有用(我尝试使用 videojs 5.9)

    /* hide time display on progress bar on the mouse position */
    .video-js .vjs-progress-control:hover .vjs-mouse-display,
    /* hide time display on progress bar on the current play position */
    .video-js .vjs-progress-holder .vjs-play-progress {
       display: none; 
    }
    

    【讨论】:

      【解决方案2】:

      添加此类以仅禁用当前时间工具提示:

      .video-js .vjs-progress-control:hover .vjs-play-progress:after {
          display:none;
      }
      

      注意添加的:hover,它只隐藏了工具提示。

      【讨论】:

      • 我试过这个,但它不起作用。我的确切用例如下:当兄弟元素悬停时(范围滑块插件),我想隐藏当前时间工具提示。我使用mouseentermouseleave 事件将名为hide 的类添加和删除到.vjs-play-progress,并使用以下选择器:.video-js .vjs-progress-control:hover .vjs-play-progress.hide:after
      • 你想隐藏这两个中的哪一个? 14 还是 15? i.imgur.com/yDrEBtM.png
      • jsfiddle.net/w91vvjy0/3 这是一个小提琴,显示它隐藏一个或两个时间弹出窗口。
      • 我想隐藏 14。看着你的小提琴,我可以看到它应该可以工作,但在我的情况下它不是:进度条的活动部分也消失了(可能是因为一个我的插件)。我猜你回答了这个问题。如果我能找到它,我会验证它并让你了解真正的原因。感谢您的帮助。
      猜你喜欢
      • 1970-01-01
      • 2011-03-02
      • 2011-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多