Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Menu
blandzi
post
Post #1





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 9.12.2008

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


Jak zrobić menu jak tutaj http://haker.org.pl/news.php które zmienia kolor po przejechaniu po danej kategorii?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 12)
piotrooo89
post
Post #2


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




jakie menu? ja nie wiem jakie menu w tym linku nic nie ma.
Go to the top of the page
+Quote Post
matixrr
post
Post #3





Grupa: Zarejestrowani
Postów: 207
Pomógł: 44
Dołączył: 14.04.2007

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


Chodzi o to, że po najechaniu np. na Archiwum Nesów zmienia sie kolor w sposob plynny.

Proponuje sprawdzic zastosowane skrypty i style na stronie a poznasz odpowiedz (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
piotrooo89
post
Post #4


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




aaa już wiem. minAjax ma taką opcje. http://mintajax.pl/Przewodnik/Efekty/, poczytaj.
Go to the top of the page
+Quote Post
blandzi
post
Post #5





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 9.12.2008

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


wielki dzieki za pomoc

mam pytanie dotyczace wlasnie tego mintajaxa napisałem cos takiego zeby go wyprobowac

Kod
<html>
<head>
<script type="text/javascript" src="mintAjax.js"></script>
</head>
<script type="text/javascript">
        
function ColorIn() {
    mint.fx.Color("box", "backgroundColor", null, "B22222", 20, 500);
    mint.fx.Color("box", "borderColor", null, "000000", 20, 500);
}

function ColorOut() {
    mint.fx.Color("box", "backgroundColor", null, "B7C059", 20, 500);
    mint.fx.Color("box", "borderColor", null, "8F9D11", 20, 500);

}
</script>

<div <a href=http://jakasstrona.pl>strona</a> onmouseover="ColorIn()" onmouseout="ColorOut()"></div>


</html>


i nie wiem jak zrobic zeby to dzialalo bo niezbyt sie znam na technologi ajax. Mogłby ktos podac jak zrobic zeby ten link zmienial kolor? Bylbym bardzo wdzieczny
Go to the top of the page
+Quote Post
blandzi
post
Post #6





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 9.12.2008

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


czyli wystarczy ze wezme wszystko w <?php ?> ?

--
Jest opcja "edytuj". (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

erix
Go to the top of the page
+Quote Post
piotrooo89
post
Post #7


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




więc twój head powinien wyglądać tak:

  1. <script type="text/javascript" src="../js/mintajax.js"></script>
  2.  
  3. <script type="text/javascript">
  4.  
  5. function ColorIn() {
  6. mint.fx.Color("box", "backgroundColor", null, "B22222", 20, 500);
  7. mint.fx.Color("box", "borderColor", null, "000000", 20, 500);
  8. }
  9.  
  10. function ColorOut() {
  11. mint.fx.Color("box", "backgroundColor", null, "B7C059", 20, 500);
  12. mint.fx.Color("box", "borderColor", null, "8F9D11", 20, 500);
  13. }
  14.  
  15. </script>
  16. </head>


i w body:

  1. <a id="link" class="link" onmouseover="ColorIn()" onmouseout="ColorOut()">Link</a>
  2. </body>


pomyśl trochę, pokombinuj, poczytaj znajdziesz tam wszystko.
Go to the top of the page
+Quote Post
blandzi
post
Post #8





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 9.12.2008

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


kombinuje juz ponad 30min i nie moge nic wymyslic. Prosze wstaw caly kod zeby link zmienial kolory. bo skleilem to co dales wczesniej i zmienilem sciezke do pliku mintajax.js na taka jaka jest u mnie i kombinowalem na rozne sposoby ale nie chce dzialac
Go to the top of the page
+Quote Post
matixrr
post
Post #9





Grupa: Zarejestrowani
Postów: 207
Pomógł: 44
Dołączył: 14.04.2007

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


Bo z tego co sie zorientowalem to skrypt wymaga jeszcze arkusza stylow (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
piotrooo89
post
Post #10


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




  1. <script type="text/javascript" src="mintajax.js"></script>
  2.  
  3. <style type="text/css">
  4. a
  5. {
  6. font-size: 20px;
  7. color: #B7C059;
  8. text-decoration: none;
  9. }
  10. <script type="text/javascript">
  11.  
  12. function ColorIn() {
  13. mint.fx.Color("link", "color", null, "B22222", 20, 500);
  14. }
  15.  
  16. function ColorOut() {
  17. mint.fx.Color("link", "color", null, "B7C059", 20, 500);
  18. }
  19.  
  20. </head>
  21. <a href="" id="link" class="link" onmouseover="ColorIn()" onmouseout="ColorOut()">Link</a>
  22. </body>
  23. </html>


sprawdzałem u siebie i działa. poćwicz czytanie ze zrozumieniem i uczenie się na przykładach (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

//EDIT

nie zamknąłem taga...

Ten post edytował piotrooo89 1.02.2009, 15:13:18
Go to the top of the page
+Quote Post
Spyder
post
Post #11





Grupa: Zarejestrowani
Postów: 269
Pomógł: 7
Dołączył: 12.10.2006
Skąd: Newcastle Upon Tyne

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


  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
  3.  
  4.  
  5.  
  6. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  7. <style type="text/css">
  8.  
  9. .box {
  10. float: left;
  11. clear: none;
  12. width: 80px;
  13. height: 20px;
  14. color: White;
  15. text-align: center;
  16. margin: 4px;
  17. padding: 2px;
  18. border: 1px solid #8F9D11;
  19. background-color: #B7C059;
  20. }
  21. a { color:#B7C059}
  22.  
  23. </style>
  24. <script type="text/javascript" src="mintajax.js"></script>
  25. <script type="text/javascript">
  26.  
  27. function ColorIn() {
  28. mint.fx.Color("box", "backgroundColor", null, "B22222", 20, 500);
  29. mint.fx.Color("box", "borderColor", null, "000000", 20, 500);
  30. }
  31. function TextIn() {
  32. mint.fx.Color("text", "color", null, "B22222", 20, 500);
  33. }
  34.  
  35. function ColorOut() {
  36. mint.fx.Color("box", "backgroundColor", null, "B7C059", 20, 500);
  37. mint.fx.Color("box", "borderColor", null, "8F9D11", 20, 500);
  38. }
  39. function TextOut() {
  40. mint.fx.Color("text", "color", null, "B7C059", 20, 500);
  41. }
  42.  
  43. </script>
  44. </head><body>
  45.  
  46.  
  47. <a href="#" id="box" class="box" onmouseover="ColorIn()" onmouseout="ColorOut()">Test Link</a>
  48. <a href="#" id="text" class="text" onmouseover="TextIn()" onmouseout="TextOut()">Test Link</a>
  49.  
  50. </body></html>


To samo co wyzej tyle ze 2 wersje (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post
blandzi
post
Post #12





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 9.12.2008

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


Dzieki za pomoc wszystko ladnie dziala ale gdy chcialem zrobic dla kilku to mi sie tylko pokazuje ostatni element menu
Kod
<html>
  <head>
  <script type="text/javascript" src="mintAjax.js"></script>
  
  <style type="text/css">
  a
  {
  font-size: 20px;
  color: #B7C059;
  text-decoration: none;
  }
  </style>
  <script type="text/javascript">
  
  function ColorIn() {
  mint.fx.Color("link", "color", null, "B22222", 20, 500);
  }
  function ColorOut() {
  mint.fx.Color("link", "color", null, "B7C059", 20, 500);
  }
  
  
  function ColorIn1() {
  mint.fx.Color("link1", "color", null, "B22222", 20, 500);
  }
  function ColorOut1() {
  mint.fx.Color("link1", "color", null, "B7C059", 20, 500);
  }
  
  function ColorIn2() {
  mint.fx.Color("link2", "color", null, "B22222", 20, 500);
  }
  function ColorOut2() {
  mint.fx.Color("link2", "color", null, "B7C059", 20, 500);
  }
  
  function ColorIn3() {
  mint.fx.Color("link3", "color", null, "B22222", 20, 500);
  }
  function ColorOut3() {
  mint.fx.Color("link3", "color", null, "B7C059", 20, 500);
  }
  
  function ColorIn4() {
  mint.fx.Color("link4", "color", null, "B22222", 20, 500);
  }
  function ColorOut4() {
  mint.fx.Color("link4", "color", null, "B7C059", 20, 500);
  }
  
  
  </script>
  </head>
  <body>
  
  <A HREF="index.php" id="link" class="link" onmouseover="ColorIn()" onmouseout="ColorOut()>Strona główna</A><BR>
  <A HREF="lab.php" id="link1" class="link1" onmouseover="ColorIn1()" onmouseout="ColorOut1()>Moje projekty</A><BR>
  <A HREF="ja.php" id="link2" class="link2" onmouseover="ColorIn2()" onmouseout="ColorOut2()>O mnie</A><BR>
  <A HREF="linki.php" id="link3" class="link3" onmouseover="ColorIn3()" onmouseout="ColorOut3()>Linki</A><BR>
  <A HREF="wiadomosc.php" id="link4" class="link4" onmouseover="ColorIn4()" onmouseout="ColorOut4()>Napisz do mnie</A>
  
  </body>
  </html>

Co zmienic zeby wyswietlalo mi wszystkie elementy menu? i w jaki sposob moge zrobic zeby dla kazdego elemeu nie tworzyc nowej funkcji?

Ten post edytował blandzi 1.02.2009, 16:15:48
Go to the top of the page
+Quote Post
piotrooo89
post
Post #13


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




  1. <script type="text/javascript">
  2.  
  3. function ColorIn1() {
  4. mint.fx.Color("link", "color", null, "B22222", 20, 500);
  5. }
  6. function ColorIn2() {
  7. mint.fx.Color("link2", "color", null, "B22222", 20, 500);
  8. }
  9. function ColorIn3() {
  10. mint.fx.Color("link3", "color", null, "B22222", 20, 500);
  11. }
  12.  
  13. function ColorOut1() {
  14. mint.fx.Color("link", "color", null, "B7C059", 20, 500);
  15. }
  16. function ColorOut2() {
  17. mint.fx.Color("link2", "color", null, "B7C059", 20, 500);
  18. }
  19. function ColorOut3() {
  20. mint.fx.Color("link3", "color", null, "B7C059", 20, 500);
  21. }
  22.  
  23. </head>
  24. <a href="" id="link" class="link" onmouseover="ColorIn1()" onmouseout="ColorOut1()">Link</a>
  25. <a href="" id="link2" class="link2" onmouseover="ColorIn2()" onmouseout="ColorOut2()">Link</a>
  26. <a href="" id="link3" class="link3" onmouseover="ColorIn3()" onmouseout="ColorOut3()">Link</a>
  27. </body>


a jak zrobić żeby za każdym razem nie trzeba było dodawać od nowa, po prostu nie wiem (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
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.08.2025 - 11:45