Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS]W jaki sposób dodać hover dla SVG?
trifek
post 29.07.2020, 19:59:20
Post #1





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

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


Witam serdecznie,
Mam taki kod:
  1.  
  2. <div class="col-md-6 col-lg-4 pb-4">
  3. <a href="#">
  4. <div class="media align-items-center offer-list p-3">
  5. <object type="image/svg+xml" data="images/szymon/icons/obrazek.svg" class="pr-3" ></object>
  6. <div class="media-body pr-3">
  7. Link
  8. </div>
  9. </div>
  10. </a>
  11. </div>
  12.  
  13.  
  14.  
  15. .offer-list {
  16. font-family: 'Now Regular';
  17. border-radius: 10px;
  18. border: 1px solid var(--colorOffer);
  19. font-size: 22px;
  20. height: 105px;
  21. transition: all ease 0.3s;
  22. }
  23.  
  24. .offer-list:hover {
  25. color: var(--colorMerc);
  26. border: 2px solid var(--colorMerc);
  27. }
  28.  
  29. .offer-list:hover object path{
  30. color: red;
  31. fill: red;
  32. stroke:red;
  33. }
  34.  


Podświetlenie działa mi dla tekstu oraz ramki. Chciałbym jeszcze zmienić kolor obiektu svg, jednak kod: .offer-list:hover object nie działa sad.gif

W jaki sposób można to zrobić?

Ten post edytował trifek 29.07.2020, 20:28:23
Go to the top of the page
+Quote Post
Pyton_000
post 30.07.2020, 14:40:27
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


https://css-tricks.com/change-color-of-svg-on-hover/
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: 16.04.2024 - 16:11