[CSS][Javascript]
Go to solution
Solved by TAtari,
The problem is in the way you centred the play button it will not allow for position transition.
Here is an easy way of doing it:
Css changes:#videoWrapper{ top: 0; left: 0; position: relative;}#playButton { position: absolute; z-index: 46; -webkit-transition: all ease .2s; -moz-transition: all ease .2s; -o-transition: all ease .2s; transition: all ease .2s; /* Set the big button styles */ width: 100px; height: 100px; left: 50%; bottom: 50%; margin: 0 0 -50px -50px; }#videoWrapper.playing #playButton { /* Small button at bottom left */ left: 0; bottom: 0; margin: 0; width: 30px; height: 30px;}Html:<div id="videoWrapper" class="video-wrapper"> <img src="play.jpg" class="play-full" onClick="playCurrent();" id="playButton"> <video id="videoplayer"> <source src="Kathy_Christmas.mp4"> Your browser does not support HTML5 or the mp4 video container </video> <div id="video-controls"></div></div>JS:function playCurrent(){ $('#videoWrapper').addClass('playing');}
You can see it in action: http://iis.tatari.se/ltt/hazy125.htm

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now