Advertisement
Guest User

CSS hover

a guest
Jul 11th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. HTML:
  2. <!DOCTYPE html>
  3. <html lang="pl" dir="ltr">
  4. <head>
  5. <meta charset="utf-8">
  6. <title>FC Barcelona</title>
  7. <link rel="stylesheet" href="style.css"/>
  8. </head>
  9. <body>
  10. <div id="header"> <h1>FC Barcelona</h1> </div>
  11. <div id="container">
  12.  
  13.  
  14. <div class="all">
  15. <a href="#"><img class="pictureleft" src="image/lm10.jpg"/></a>
  16. <a class="click" href="#"><p>Lionel Messi</p></a>
  17. </div>
  18. </div>
  19. </body>
  20. </html>
  21.  
  22. CSS:
  23.  
  24. body{
  25. background-color: #34337D;
  26. }
  27. #header{
  28. width: 1000px;
  29. min-height: 100px;
  30. margin: auto;
  31. text-align: center;
  32. letter-spacing: 5px;
  33. font-size: 25px;
  34. color: #C00000;
  35. }
  36.  
  37. #container{
  38. padding: 0;
  39. width: 1000px;
  40. min-height: 800px;
  41. margin: auto;
  42. }
  43.  
  44. .all{
  45. position: relative;
  46. width: 480px;
  47. height: 325px;
  48. }
  49. .pictureleft{
  50. float: left;
  51. width: 480px;
  52. height: 325px;
  53. transition: 1s;
  54. border-radius: 50px;
  55. }
  56. .pictureleft:hover{
  57. transition: 1s;
  58. border-radius: 15px;
  59. transform: scale(1.1);
  60. }
  61. .all .click{
  62. position: absolute;
  63. display: block;
  64. width: 480px;
  65. height: 65px;
  66. background-color: #111;
  67. opacity: 0;
  68. left:0;
  69. bottom:0;
  70.  
  71. }
  72. .all:hover .click{
  73. opacity: 0.8;
  74. display: flex;
  75. align-items: center;
  76. justify-content: center;
  77. color: #ffff00;
  78. bottom: -12.5px;
  79. font-size: 32px;
  80. transform: scale(1.1);
  81. transition: 1s;
  82. border-radius: 0px 0px 15px 15px;
  83. text-decoration: none;
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement