Guest User

CSS Toggle

a guest
Jul 4th, 2014
1,981
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.58 KB | None | 0 0
  1.  
  2. /*===========- Making Toggle (pure css) -==========*/
  3.  
  4. .hook {
  5.     position: fixed;
  6.     z-index: 900;
  7.     height: 0; width: 0; border: 0 solid #FFF;
  8.     top: -9999px;
  9. }
  10. .hook:active {
  11.     left: -9999px;
  12.     visibility: hidden;
  13. }
  14.  
  15. .gallery-post:active > .hook {
  16.     top: 0; left: 0;
  17.     width: 100%; height: 100%;
  18. }
  19. .hook:hover {
  20.     top: 0; left: 0;
  21.     width: 100%; height: 100%;
  22. }
  23. .hook:hover ~ img {
  24.     width: 80%;
  25.     position: absolute;
  26.     margin-left: auto;
  27.     margin-right: auto;
  28.     left: 0;
  29.     right: 0;
  30.     top: 100px;
  31.     border: 5px solid #EEE;
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment