Created
April 29, 2011 09:00
-
-
Save rymai/948072 to your computer and use it in GitHub Desktop.
SublimeVideo: Magnifying glass on zoomable thumbnail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Inside the <head> tag --> | |
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script> | |
<style type="text/css" media="screen"> | |
#zoomable a { | |
display:block; | |
width:180px; | |
height:76px; | |
background:#000; | |
position:relative; | |
-webkit-box-shadow:rgba(0,0,0,0.4) 0 4px 10px; | |
-moz-box-shadow:rgba(0,0,0,0.4) 0 4px 10px; | |
box-shadow:rgba(0,0,0,0.4) 0 4px 10px; | |
} | |
#zoomable a span.zoom_icon { | |
display:block; | |
width:100%; | |
height:100%; | |
position:absolute; | |
top:0; | |
left:0; | |
background:url(zoom_icon.png) no-repeat bottom right; | |
opacity:0.3; | |
-o-transition:opacity 0.25s; | |
-moz-transition:opacity 0.25s; | |
-webkit-transition:opacity 0.25s; | |
transition:opacity 0.25s; | |
} | |
#zoomable a:hover span.zoom_icon {opacity:1} | |
</style> | |
<!-- Inside the <body> tag --> | |
<div id="zoomable"> | |
<a class="sublime" href="video.mp4"> | |
<img alt='' height='76' src='posterframe.jpg' width='180'> | |
<span class="zoom_icon"></span> | |
</a> | |
<video class="sublime zoom" poster="posterframe.jpg" width="640" height="360" preload="none"> | |
<source src="video.mp4" /> | |
<source src="video.ogv" /> | |
</video> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment