Ove
Ove

Reputation: 125

Play/Pause HTML5 video using CSS selectors

On my page I have a <video> tag. In my CSS I can style this video tag using the following selector:

.current video{
  width:400px;
  left:0px;
}

Is it possible to start the video as well using css? I found the relevant looking property animation-play-state:running;, however this has a different usage.

Upvotes: 0

Views: 2942

Answers (1)

phihag
phihag

Reputation: 287825

No, you cannot configure video playback in CSS. However, you can set the HTML autoplay attribute, like this:

<video src="video.mov" autoplay="autoplay"></video>

Upvotes: 1

Related Questions