Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS] Odnośniki
ayo1001
post
Post #1





Grupa: Zarejestrowani
Postów: 74
Pomógł: 1
Dołączył: 29.03.2013

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


Witam,

Jak można przerobić to:

(IMG:http://images.tinypic.pl/i/00356/u697gtp7d5av_t.jpg)

na:

(IMG:http://images.tinypic.pl/i/00356/wy3llcq5kn54_t.jpg)
Go to the top of the page
+Quote Post
Monter08
post
Post #2





Grupa: Zarejestrowani
Postów: 237
Pomógł: 22
Dołączył: 16.09.2010
Skąd: Lubaczów

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


a co tu się zmienia oprócz koloru czcionki?
Go to the top of the page
+Quote Post
-Gość-
post
Post #3





Goście







Kod
a:hover {color:#fff;}
Go to the top of the page
+Quote Post
ayo1001
post
Post #4





Grupa: Zarejestrowani
Postów: 74
Pomógł: 1
Dołączył: 29.03.2013

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


Zaznaczony element oraz "hover" ma być biały a reszta tekstu czarna.
Go to the top of the page
+Quote Post
-Gość-
post
Post #5





Goście







Zaznaczonemu elementowi dodaj klasę np. .active i za pomocą CSS zmień kolor czcionki
Kod
.active, a:hover {color:#fff;}
Go to the top of the page
+Quote Post
ayo1001
post
Post #6





Grupa: Zarejestrowani
Postów: 74
Pomógł: 1
Dołączył: 29.03.2013

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


Wszystkie czcionki są białe...
Go to the top of the page
+Quote Post
miras
post
Post #7





Grupa: Zarejestrowani
Postów: 1 004
Pomógł: 9
Dołączył: 18.01.2011
Skąd: Siedlce

Ostrzeżenie: (30%)
XX---


a jeśli oczekujesz konkretniejszej odpowiedzi to musisz wrzucić kod.
Go to the top of the page
+Quote Post
-Gość-
post
Post #8





Goście







Kod
.menu li:hover a,
.menu .active a {color:#fff;}
Go to the top of the page
+Quote Post
ayo1001
post
Post #9





Grupa: Zarejestrowani
Postów: 74
Pomógł: 1
Dołączył: 29.03.2013

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


Dzięki, działa.
Go to the top of the page
+Quote Post
miras
post
Post #10





Grupa: Zarejestrowani
Postów: 1 004
Pomógł: 9
Dołączył: 18.01.2011
Skąd: Siedlce

Ostrzeżenie: (30%)
XX---


tu masz tą czarną czcionkę dla reszty jeszcze:

  1. .menu ul {
  2. text-align: left;
  3. display: inline;
  4. margin: 0;
  5. padding: 15px 4px 17px 0;
  6. list-style: none;
  7. }
  8. .menu ul li {
  9. font: bold 12px/18px sans-serif;
  10. display: inline-block;
  11. margin-right: -4px;
  12. position: relative;
  13. padding: 15px 20px;
  14. background: #fff;
  15. cursor: pointer;
  16. -webkit-transition: all 0.2s;
  17. -moz-transition: all 0.2s;
  18. -ms-transition: all 0.2s;
  19. -o-transition: all 0.2s;
  20. transition: all 0.2s;
  21. }
  22. .menu ul li:hover {
  23. background: #555;
  24. }
  25.  
  26. .menu ul li.active {
  27. background: #555;
  28. }
  29. .menu ul li ul {
  30. padding: 0;
  31. position: absolute;
  32. top: 48px;
  33. left: 0;
  34. width: 150px;
  35. -webkit-box-shadow: none;
  36. -moz-box-shadow: none;
  37. box-shadow: none;
  38. display: none;
  39. opacity: 0;
  40. visibility: hidden;
  41. -webkit-transiton: opacity 0.2s;
  42. -moz-transition: opacity 0.2s;
  43. -ms-transition: opacity 0.2s;
  44. -o-transition: opacity 0.2s;
  45. -transition: opacity 0.2s;
  46. }
  47. .menu ul li ul li {
  48. background: #555;
  49. display: block;
  50. text-shadow: 0 -1px 0 rgb(61, 61, 61);
  51. border-bottom: 1px solid #777;
  52. }
  53.  
  54. .menu li:hover a,
  55. .menu .active a {color:#fff;}
  56. .c { color: #000; }
  57.  
  58. .menu ul li ul li:hover { background: #666; }
  59. .menu ul li:hover ul {
  60. display: block;
  61. opacity: 1;
  62. visibility: visible;
  63. }
  64. .menu a, a.menu { text-decoration: none; }
  65. </head>
  66.  
  67.  
  68. <div class="menu">
  69. <ul>
  70. <li class="active">
  71. <a href="#">AAAA</a>
  72. <ul>
  73. <li><a href="#">AAAA</a></li>
  74. <li><a href="#">BBBB</a></li>
  75. <li><a href="#">CCCC</a></li>
  76. <li><a href="#">DDDD</a></li>
  77. </ul>
  78. </li>
  79. <li>
  80. <a href="#" class="c">BBBB</a>
  81. <ul>
  82. <li><a href="#">AAAA</a></li>
  83. <li><a href="#">BBBB</a></li>
  84. <li><a href="#">CCCC</a></li>
  85. <li><a href="#">DDDD</a></li>
  86. </ul>
  87. </li>
  88. <li>
  89. <a href="#" class="c">CCCC</a>
  90. <ul>
  91. <li><a href="#">AAAA</a></li>
  92. <li><a href="#">BBBB</a></li>
  93. </ul>
  94. </li>
  95. </div>
  96.  
  97. </html>
  98.  
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 22.12.2025 - 20:57