Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][CSS][JavaScript]Zamykanie okna menu
david8213
post 30.05.2019, 15:20:18
Post #1





Grupa: Zarejestrowani
Postów: 308
Pomógł: 0
Dołączył: 9.12.2009

Ostrzeżenie: (10%)
X----


Co należy dodac aby po kliknięciu w link w MENU schowało mi się MENU. Bo idzie do linka ale MENU zostaje i zasłania stronę

  1.  
  2. /*
  3. .sidenav {
  4. height: 100%;
  5. width: 0;
  6. position: fixed;
  7. z-index: 11;
  8. top: 0;
  9. left: 0;
  10. overflow-x: hidden;
  11. transition: 0.5s;
  12. padding-top: 60px;
  13. text-align:center;
  14. background-color: rgb(255,255,255);
  15. background-color: rgba(255,255,255, 0.95);
  16. */
  17.  
  18. <div class="topnav">
  19. <div class="pasek_left"><span style="font-size:25px;cursor:pointer;margin-left: 6px;" onclick="openNav()"> M E N U ?</span>
  20. </div>
  21. <div class="pasek_right">
  22. </div>
  23. </div>
  24.  
  25.  
  26.  
  27. <div id="mySidenav" class="sidenav">
  28. <a href="java script:void(0)" class="closebtn" onclick="closeNav()">×</a>
  29. <HR width=50%>
  30. <a href="#o_mnie">O mnie</a>
  31. <HR>
  32. <a href="#portfolio">Portfolio</a>
  33. <HR>
  34. <a href="#oferta">Oferta</a>
  35. <HR>
  36. <a href="#blog">Blog</a>
  37. <HR>
  38. <a href="#kontakt">Kontakt</a>
  39. <HR>
  40. </div>
  41.  
  42. function openNav() {
  43. document.getElementById("mySidenav").style.width = "100%";
  44. }
  45.  
  46. function closeNav() {
  47. document.getElementById("mySidenav").style.width = "0";
  48. }
  49.  


Ten post edytował david8213 30.05.2019, 15:33:11
Go to the top of the page
+Quote Post

Posty w temacie


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: 14.08.2025 - 11:37