Tutorials

Eine immer größer werdende Tutorialdatenbank.

PHP-Fusion Core

Aktuelle PHP-Fusion Vollversionen und Updates

Addon Downloads

Alle Downloads garantiert Kostenlos

Support 24/7

24 Stunden, 7 Tage die Woche, das ganze Jahr.

Verschachtelte Navigation mit Slidedown
Kategorie: CSS
PHP-Fusion Version: Keine
Schwierigkeitsgrad:
Wie Ihr eine schöne Navigation z.b. für die Seite erstellen könnt, seht ihr hier.

Faq

Code
<div class="css-treeview">
<ul>
<li><input type="checkbox" id="item-0" /><label for="item-0">This Folder is Closed By Default</label>
<ul>
<li><input type="checkbox" id="item-0-0" /><label for="item-0-0">Ooops! A Nested Folder</label>
<ul>
<li><input type="checkbox" id="item-0-0-0" /><label for="item-0-0-0">Look Ma - No Hands!</label>
<ul>
<li><a href="./">First Nested Item</a></li>
<li><a href="./">Second Nested Item</a></li>
<li><a href="./">Third Nested Item</a></li>
<li><a href="./">Fourth Nested Item</a></li>
</ul>
</li>
<li><a href="./">Item 1</a></li>
<li><a href="./">Item 2</a></li>
<li><a href="./">Item 3</a></li>
</ul>
</li>
<li><input type="checkbox" id="item-0-1" /><label for="item-0-1">Yet Another One</label>
<ul>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
</ul>
</li>
<li><input type="checkbox" id="item-0-2" disabled="disabled" /><label for="item-0-2">Disabled Nested Items</label>
<ul>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
</ul>
</li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
</ul>
</li>
<li><input type="checkbox" id="item-1" checked="checked" /><label for="item-1">This One is Open by Default...</label>
<ul>
<li><input type="checkbox" id="item-1-0" /><label for="item-1-0">And Contains More Nested Items...</label>
<ul>
<li><a href="./">Look Ma - No Hands</a></li>
<li><a href="./">Another Item</a></li>
<li><a href="./">And Yet Another</a></li>
</ul>
</li>
<li><a href="./">Lorem</a></li>
<li><a href="./">Ipsum</a></li>
<li><a href="./">Dolor</a></li>
<li><a href="./">Sit Amet</a></li>
</ul>
</li>
<li><input type="checkbox" id="item-2" /><label for="item-2">Can You Believe...</label>
<ul>
<li><input type="checkbox" id="item-2-0" /><label for="item-2-0">That This Treeview...</label>
<ul>
<li><input type="checkbox" id="item-2-2-0" /><label for="item-2-2-0">Does Not Use Any JavaScript...</label>
<ul>
<li><a href="./">But Relies Only</a></li>
<li><a href="./">On the Power</a></li>
<li><a href="./">Of CSS3</a></li>
</ul>
</li>
<li><a href="./">Item 1</a></li>
<li><a href="./">Item 2</a></li>
<li><a href="./">Item 3</a></li>
</ul>
</li>
<li><input type="checkbox" id="item-2-1" /><label for="item-2-1">This is a Folder With...</label>
<ul>
<li><a href="./">Some Nested Items...</a></li>
<li><a href="./">Some Nested Items...</a></li>
<li><a href="./">Some Nested Items...</a></li>
<li><a href="./">Some Nested Items...</a></li>
<li><a href="./">Some Nested Items...</a></li>
</ul>
</li>
<li><input type="checkbox" id="item-2-2" disabled="disabled" /><label for="item-2-2">Disabled Nested Items</label>
<ul>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
<li><a href="./">item</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>

CSS

GeSHi: CSS


  1. .css-treeview ul,
  2. .css-treeview li
  3. {
  4. padding: 0;
  5. margin: 0;
  6. list-style: none;
  7. }
  8.  
  9. .css-treeview input
  10. {
  11. position: absolute;
  12. opacity: 0;
  13. }
  14.  
  15. .css-treeview
  16. {
  17. font: normal 11px "Segoe UI", Arial, Sans-serif;
  18. -moz-user-select: none;
  19. -webkit-user-select: none;
  20. user-select: none;
  21. }
  22.  
  23. .css-treeview a
  24. {
  25. color: #00f;
  26. text-decoration: none;
  27. }
  28.  
  29. .css-treeview a:hover
  30. {
  31. text-decoration: underline;
  32. }
  33.  
  34. .css-treeview input + label + ul
  35. {
  36. margin: 0 0 0 22px;
  37. }
  38.  
  39. .css-treeview input + label + ul
  40. {
  41. display: none;
  42. }
  43.  
  44. .css-treeview label,
  45. .css-treeview label::before
  46. {
  47. cursor: pointer;
  48. }
  49.  
  50. .css-treeview input:disabled + label
  51. {
  52. cursor: default;
  53. opacity: .6;
  54. }
  55.  
  56. .css-treeview input:checked:not(:disabled) + label + ul
  57. {
  58. display: block;
  59. }
  60.  
  61. .css-treeview label,
  62. .css-treeview label::before
  63. {
  64. background: url("./icons.png") no-repeat;
  65. }
  66.  
  67. .css-treeview label,
  68. .css-treeview a,
  69. .css-treeview label::before
  70. {
  71. display: inline-block;
  72. height: 16px;
  73. line-height: 16px;,
  74. vertical-align: middle;
  75. }
  76.  
  77. .css-treeview label
  78. {
  79. background-position: 18px 0;
  80. }
  81.  
  82. .css-treeview label::before
  83. {
  84. content: "";
  85. width: 16px;
  86. margin: 0 22px 0 0;
  87. vertical-align: middle;
  88. background-position: 0 -32px;
  89. }
  90.  
  91. .css-treeview input:checked + label::before
  92. {
  93. background-position: 0 -16px;
  94. }
  95.  
  96. /* webkit adjacent element selector bugfix */
  97. @media screen and (-webkit-min-device-pixel-ratio:0)
  98. {
  99. .css-treeview
  100. {
  101. -webkit-animation: webkit-adjacent-element-selector-bugfix infinite 1s;
  102. }
  103.  
  104. @-webkit-keyframes webkit-adjacent-element-selector-bugfix
  105. {
  106. from
  107. {
  108. padding: 0;
  109. }
  110. to
  111. {
  112. padding: 0;
  113. }
  114. }
  115. }
gewandelt in 0.004 Sekunden, benutzt wurde GeSHi 1.0.8.10




Demo ansehen

Tutorial Verlinken

URL: 
BBCode: 
HTML-Code: 
Kommentare
Es wurden noch keine Kommentare verfasst.
Kommentar schreiben
Bitte logge dich ein, um einen Kommentar zu verfassen.
Anzeige


Anmelden


Registrieren Passwort vergessen

RSS Feeds

Feeds abonieren

Letzte News
Letzte Threads
Anzeige

© Copyright 2019 PHP-Fusion.at | Alle Rechte vorbehalten.

© 2016 Real Space. All rights reserved | Design by W3layouts | 12,677,138 eindeutige Besuche
Powered by PHP-Fusion copyright © 2002 - 2019 by Nick Jones. Released as free software without warranties under GNU Affero GPL v3.