| Autor | Zpráva | ||
|---|---|---|---|
| dusanga Profil |
#1 · Zasláno: 11. 2. 2014, 07:23:43
Ahojte, skuste mi pomoct.
Vytvoril som si rozbalovacie menu. V prvej urovni sa pred textom meni znak "+" na "-" podla toho ci je checkbox vybraty alebo nie. V druhej urovni som tieto znaky zadal ako "t" a "f" ale miesto "t" sa mi zobrazuje "-" z prvej urovne. Niekde v selektoroch robim chybu, no nie a nie ju najst. Dakujem. <!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
input.r1 {display: none;}
input[type=checkbox]:checked + .r2 .obsah {display: block;}
.r2 > .obsah {display: none;}
.r2 > label {display: block; cursor: pointer; font-size: 120%; font-weight: bold;}
.r2 > label:before {content: "+"; padding: 0 .3em; margin-right: .5em; border-radius: 3px;}
input[type=checkbox]:checked + .r2 label:before {content: "-";}
input.r11 {display: none;}
.r21 > .obsah11 {display: none;}
input[type=checkbox]:checked + .r21 .obsah11 {display: block;}
.r21 > label {display: block; cursor: pointer;}
.r21 > label:before {content: "t"; padding: 0 .3em; margin-right: .5em; border-radius: 3px;}
input[type=checkbox]:checked + .r21 label:before {content: "f";}
</style>
</head>
<body>
<input type="checkbox" class="r1" id="box1">
<div class="r2">
<label for="box1">Vleky, lanovky, sedačky.</label>
<div class="obsah">
<input type="checkbox" class="r11" id="box11">
<div class="r21">
<label for="box11">Vleky.</label>
<div class="obsah11">
<p>Obsah sekcie vleky</p>
</div>
</div>
<input type="checkbox" class="r11" id="box12">
<div class="r21">
<label for="box12">Lanovky.</label>
<div class="obsah11">
<p>Obsah sekcie lanovky</p>
</div>
</div>
<input type="checkbox" class="r11" id="box13">
<div class="r21">
<label for="box13">Sedacky.</label>
<div class="obsah11">
<p>Obsah sekcie sedacky</p>
</div>
</div>
</div>
</div>
<input type="checkbox" class="r1" id="box2">
<div class="r2">
<label for="box2">Lyziarsky svah.</label>
<div class="obsah">
<p>Obsah sekcie lyziarsky svah</p>
</div>
</div>
</body>
</html> |
||
| peta Profil |
#2 · Zasláno: 11. 2. 2014, 13:06:45
.r21 > label:before {content: "++++" !important; padding: 0 .3em; margin-right: .5em; border-radius: 3px;} |
||
|
Časová prodleva: 13 let
|
|||
0