Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Efekt hover na zdjęciu z 2 linijkami tekstu
trifek
post 9.02.2019, 11:21:54
Post #1





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 28.09.2015

Ostrzeżenie: (0%)
-----


Witam.
Mam taki kod:
  1.  
  2. <!DOCTYPE html>
  3. <html lang="pl">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <link href="assets/css/bootstrap.min.css" rel="stylesheet">
  8. <script src="assets/js/bootstrap.min.js"></script>
  9. </head>
  10. <body>
  11. <div class="col-xs-12 col-sm-4 col-md-3 col-lg-3 profil_zd">
  12. <div class="profil_zd_1"><a href="pl/Zdjecie/12"><img src="assets/uploads/posts/t4G9Q23vJrXOfBkHEYx0MbsycWd6gwo5Vjla7UnLKApZS18qDINTimPhuReC.jpg" class="img-responsive center profil_zd_2 profil_zd_2XXX"></a></div>
  13. <div class="middleImage">
  14. <div class="post-info">254</div>
  15. <div class="text">name and surname<img src="assets/images/ikon22.png" class="deleteMyAccount " id=""></div>
  16. </div>
  17. </div>
  18. .middleImage {
  19. transition: .5s ease;
  20. opacity: 0;
  21. position: absolute;
  22. top: 50%;
  23. left: 50%;
  24. transform: translate(-50%, -50%);
  25. -ms-transform: translate(-50%, -50%);
  26. text-align: center;
  27. }
  28. .profil_zd_1:hover .profil_zd_2XXX {
  29. opacity: 0.5;
  30. }
  31. .profil_zd_1:hover .middleImage {
  32. opacity: 1;
  33. }
  34. .profil_zd_2 {
  35. border-radius: 25px;
  36. }
  37. style.css:135.center {
  38. margin: 0 auto;
  39. }
  40. </style>
  41. </body>
  42. </html>

Podgląd: http://serwer1356363.home.pl/pub/rrrrr/
Potrzebuję uzyskać taki efekt: http://serwer1356363.home.pl/pub/rrrrr/sample.png

Wie ktoś może jak uzyskać taki efekt?
Go to the top of the page
+Quote Post
designcart
post 11.02.2019, 09:32:16
Post #2





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 11.07.2017

Ostrzeżenie: (0%)
-----


Idź w tę stronę:

  1.  
  2. .profil_zd_1{
  3. position:relative;
  4. background:#000;
  5. }
  6. .profil_zd_1 img{
  7. opacity:0.5;
  8. }
  9. .profil_zd_1 .post-info{
  10. color:#fff;
  11. position:absolute;
  12. left: 50%;
  13. top: 50%;
  14. transform: translate(-50%, -50%);
  15. text-align:center;
  16. }
  17. .profil_zd_1 .text{
  18. position:absolute;
  19. bottom:10px;
  20. text-align:center;
  21. }
  22.  
  23. <div class="profil_zd_1">
  24. <a href="pl/Zdjecie/12">
  25. <img src="assets/uploads/posts/t4G9Q23vJrXOfBkHEYx0MbsycWd6gwo5Vjla7UnLKApZS18qDINTimPhuReC.jpg" class="img-responsive center profil_zd_2 profil_zd_2XXX">
  26. <div class="post-info">254</div>
  27. <div class="text">name and surname<img src="assets/images/ikon22.png" class="deleteMyAccount " id=""></div>
  28. </a>
  29. </div>
  30.  
  31.  
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.03.2024 - 18:10