You are here

emvideo.thumbnail-replacement.css in Embedded Media Field 6.3

A Play button overlay for thumbnail -> video replacement.

File

contrib/emvideo/emvideo.thumbnail-replacement.css
View source
  1. /**
  2. * @file
  3. * A Play button overlay for thumbnail -> video replacement.
  4. */
  5. /**
  6. * The outer wrapper must be relative for the overlay to work.
  7. * When overriding this style in your own stylesheet,
  8. * you'll probably want to add the video's height and width here,
  9. * so that you avoid the div dropping momentarily while the thumnbail
  10. * is replaced by the video.
  11. */
  12. .emvideo-thumbnail-replacement {
  13. position: relative;
  14. display: block;
  15. /* width: 425px; */
  16. /* height: 350px; */
  17. }
  18. /* This is the overlay of a play button on the video thumbnail. */
  19. /* The span is created automatically with jQuery. */
  20. .emvideo-thumbnail-replacement span {
  21. display: block;
  22. /* This is the overlay image for use as a play button. */
  23. background: url(emvideo-play.png) no-repeat;
  24. /* This is the size of our button. DOES NOT WORK WITH DEFAULT THUMB SIZE! */
  25. width: 85px;
  26. height: 112px;
  27. /* Absolute positioning in the relative wrapper creates the overlay. */
  28. position: absolute;
  29. }
  30. .emvideo-thumbnail-replacement span:hover {
  31. background-position: -85px 0px;
  32. }
  33. /* This is centered for the default placement of video thumbnails,
  34. which is 120x90. Note that this button image doesn't work for those,
  35. because it's too big. We try anyway...
  36. Subtract half of the width of the thumbnail by half of the width of the play
  37. button, and again for the height, to get these numbers, and the next. */
  38. .emvideo-thumbnail-replacement span {
  39. left: 17px;
  40. top: 0px;
  41. }
  42. /* This is centered for the default placement of full-sized videos,
  43. which is 425x350. */
  44. .emvideo-thumbnail-replace-full .emvideo-thumbnail-replacement span {
  45. left: 170px;
  46. top: 119px;
  47. }
  48. /* This is centered for the default placement of full-sized videos. */
  49. .emvideo-thumbnail-replace-preview .emvideo-thumbnail-replacement span {
  50. left: 170px;
  51. top: 119px;
  52. }