Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [css][html] Własne title dla button
Patricco90
post
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 17.03.2014

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


Witam tworzę sobie własne title dla przycisku i mam następujący problem:

title wyśletla mi się 2x, moje i te z html*

tworze to tak:

  1. <button title="opis">PRZYCISK</button>



i css

  1. button {
  2.  
  3. text-decoration: none;
  4. }
  5.  
  6. button:hover {
  7.  
  8. position: relative;
  9. }
  10. button span {
  11. display: none
  12. }
  13. button[title]:hover:after {
  14. content: attr(title);
  15. padding: 5px 10px;
  16. color: #333;
  17. position: absolute;
  18. left: 110%;
  19. top: 110%;
  20. z-index: 20;
  21. white-space: nowrap;
  22. -moz-border-radius: 5px;
  23. -webkit-border-radius: 5px;
  24. border-radius: 6px;
  25. -moz-box-shadow: 0px 0px 4px #eb8f00;
  26. -webkit-box-shadow: 0px 0px 4px #eb8f00;
  27. box-shadow: 0px 0px 4px #eb8f00;
  28.  
  29.  
  30. }




Miał ktoś podobny problem? i zna rozwiązanie takiego problemu?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
Damonsson
post
Post #2





Grupa: Zarejestrowani
Postów: 2 355
Pomógł: 533
Dołączył: 15.01.2010
Skąd: Bydgoszcz

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


A to przejdzie?
  1. <button title="">PRZYCISK</button>

  1. button {
  2.  
  3. text-decoration: none;
  4. }
  5.  
  6. button:hover {
  7.  
  8. position: relative;
  9. }
  10. button span {
  11. display: none
  12. }
  13. button[title]:hover:after {
  14. content: "opis";
  15. padding: 5px 10px;
  16. color: #333;
  17. position: absolute;
  18. left: 110%;
  19. top: 110%;
  20. z-index: 20;
  21. white-space: nowrap;
  22. -moz-border-radius: 5px;
  23. -webkit-border-radius: 5px;
  24. border-radius: 6px;
  25. -moz-box-shadow: 0px 0px 4px #eb8f00;
  26. -webkit-box-shadow: 0px 0px 4px #eb8f00;
  27. box-shadow: 0px 0px 4px #eb8f00;
  28.  
  29.  
  30. }
Go to the top of the page
+Quote Post
Comandeer
post
Post #3





Grupa: Zarejestrowani
Postów: 1 268
Pomógł: 254
Dołączył: 11.06.2009
Skąd: Świętochłowice

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


A nie lepiej to wpakować jako button + span i połączyć przy pomocy [aria-describedby]?


--------------------
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 Aktualny czas: 20.08.2025 - 07:39