daz holmes daz holmes - 2 months ago 22
CSS Question

HTML Background Chrome not working

i have this html code that plays a video as the full background and it works great for every browser except chrome not sure why can anyone help?

the html code

<video poster="" id="bgvid" playsinline autoplay muted loop>
<source src="vid.mp4" type="video/mp4">
</video>


the css code

video#bgvid {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
-ms-transform: translateX(-50%) translateY(-50%);
-moz-transform: translateX(-50%) translateY(-50%);
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
background: url(polina.jpg) no-repeat;
background-size: cover;
}

Answer

add invert comma "" in url

background: url("polina.jpg") no-repeat;

http://www.w3schools.com/cssref/css3_pr_background.asp