最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

media - Hide Default Video Shortcode Controls on PageLoad

programmeradmin11浏览0评论

In wordpress 3.6+ when we use default video shortcode [video], controls of video are always visible on pageload. How can we hide these controls on page load and show only when we hover over the video element.

Using the CSS code below, does the trick ...

.wp-video .mejs-container .mejs-controls {
    visibility: hidden;
}

But, controls wont show on hovering then. How to solve the issue?

In wordpress 3.6+ when we use default video shortcode [video], controls of video are always visible on pageload. How can we hide these controls on page load and show only when we hover over the video element.

Using the CSS code below, does the trick ...

.wp-video .mejs-container .mejs-controls {
    visibility: hidden;
}

But, controls wont show on hovering then. How to solve the issue?

Share Improve this question edited Jan 19, 2014 at 23:49 Faisal Khurshid asked Jan 19, 2014 at 23:24 Faisal KhurshidFaisal Khurshid 4451 gold badge5 silver badges19 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 2

You need to use the hover CSS code to enable it e.g.

.mejs-container .mejs-controls:hover {
 display:block;
}

You could try:

.wp-video:not(:hover) .mejs-container .mejs-controls {
    visibility: hidden;opacity: 0;
}

This way, only showing controls on hover ;)

发布评论

评论列表(0)

  1. 暂无评论