Reputation: 115
Hi,
I have an HTML 5 Video Player on my website. Whenever I click pause or hover the video the strange black shadow appears. It's overlaying the control section. How can I get rid of that. I tried to search solution for this, but I couldn't find the solution. Please help me with this.
Upvotes: 3
Views: 7370
Reputation: 31
This is the code that worked for me, try.
video::-webkit-media-controls-panel {
background-image: linear-gradient(transparent, transparent) !important;
}
Upvotes: 3
Reputation: 2448
The webkit pseudo element for video control panel is
video::-webkit-media-controls-panel
To set or update this element you just add this css
video::-webkit-media-controls-panel {
// Your styling here
background-image: linear-gradient(transparent, transparent) !important; //Transparent for your case
}
Also, make sure you mark your styling as important. A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:
-webkit-appearance:none;
Refer more on this gist
Upvotes: 7
Reputation: 138
You can try to add css like this
video::-webkit-media-controls-panel {
background-color: transparent !important;
box-shadow: none !important
}
You could also use other pseudo in css to control the native video like
video::-webkit-media-controls-play-button {}
video::-webkit-media-controls-volume-slider {}
video::-webkit-media-controls-mute-button {}
video::-webkit-media-controls-timeline {}
video::-webkit-media-controls-current-time-display {}
Upvotes: 1