Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <p>some text...</p>
  2. <input id="zoom" type="checkbox">
  3. <label for="zoom" class="container">
  4. <img alt="kitten" src="http://placekitten.com/g/600/300"/>
  5. </label>
  6. <p>some another text</p>
  7.  
  8. * {
  9. margin:0 auto;
  10. }
  11. html, body{
  12. width:100%;
  13. height:100%;
  14. text-align:justify;
  15. }
  16. p{
  17. display:block;
  18. height:25%;
  19. overflow:hidden;
  20. }
  21. label + p {
  22. position:absolute;
  23. top:260px;
  24. height:auto;
  25. }
  26. #zoom{
  27. display:none;
  28. }
  29. input + .container {
  30. position:absolute;
  31. z-index:9999;
  32. top:25%;
  33. right:0;
  34. left:0;
  35. bottom:0;
  36. width:300px;
  37. height:150px;
  38. text-align:center;
  39. cursor:pointer;
  40. display:block;
  41. -webkit-transition: height .4s, width .4s, background-color .4s;
  42. transition: height .4s, width .4s, background-color .4s, top .4s;
  43. background-color: rgba(0,0,0,0)
  44. }
  45. input:checked + .container {
  46. position:fixed;
  47. top:0%;
  48. right:0;
  49. left:0;
  50. bottom:0;
  51. width:100%;
  52. height:100%;
  53. background-color: rgba(0,0,0,0.8);
  54. }
  55. input + .container img{
  56. max-width: 100% !important;
  57. max-height: 100% !important;
  58. position: relative;
  59. top: 50%;
  60. -webkit-transform: translateY(-50%);
  61. -ms-transform: translateY(-50%);
  62. transform: translateY(-50%);
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement