admin管理员组

文章数量:1134247

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 ;)

本文标签: mediaHide Default Video Shortcode Controls on PageLoad