Advertisement
afsarwebdev

Hover me 2

Jul 8th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. //HTML
  2. <div class="col-sm-4">
  3. <div class="au-card">
  4. <div class="au-card-fig">
  5. <a href="#"><img src="assets/images/1.jpg" alt="image"></a>
  6. </div>
  7. </div>
  8. </div>
  9.  
  10. //CSS
  11. .au-card-fig {
  12. margin-bottom: 31px;
  13. overflow: hidden;
  14. position: relative;
  15. }
  16. .au-card-fig img {
  17. width: 100%;
  18. }
  19. .au-card-fig > a::before {
  20. background: rgba(255, 255, 255, 0.9) none repeat scroll 0 0;
  21. bottom: 0;
  22. content: "";
  23. left: 50%;
  24. opacity: 1;
  25. position: absolute;
  26. right: 50%;
  27. top: 0;
  28. }
  29. .au-card-fig > a::after {
  30. background: rgba(255, 255, 255, 0.9) none repeat scroll 0 0;
  31. bottom: 50%;
  32. content: "";
  33. left: 0;
  34. opacity: 1;
  35. position: absolute;
  36. right: 0;
  37. top: 50%;
  38. }
  39. .au-card:hover .au-card-fig > a::after {
  40. bottom: 0;
  41. opacity: 0;
  42. top: 0;
  43. transition: all 500ms ease-in 0s;
  44. }
  45. .au-card:hover .au-card-fig > a::before {
  46. left: 0;
  47. opacity: 0;
  48. right: 0;
  49. transition: all 900ms ease-in 0s;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement