问题
I've got the following website: beta.leifsigersen.com
There's a movie on the front page which sometimes takes a little while to load (sometimes less than a second, sometimes a few seconds). Before the movie is loaded there's black background/borders. How can I change the color of this?
I've tried to use CSS of the video-element, but without any luck.
回答1:
Try this CSS:
.pk_video {
background-color: red !important; /* or whatever you want */
}
回答2:
So i had this annoying white bar, I got rid of it using. I applied it the the containing div.
background-color: transparent;
Alternatively use
background-color: rgba(0, 0, 0, 0);
Hope that helps
回答3:
Just add the background color to the html code itself. For example:
<video width="100%" height="100%" style="background-color: #fff;" src=""></video>
来源:https://stackoverflow.com/questions/19974902/change-background-color-of-html5-video-element