Javascript.RU

Создать новую тему Ответ
 
Опции темы Искать в теме
  #1 (permalink)  
Старый 21.04.2020, 00:26
Новичок на форуме
Отправить личное сообщение для Anjik Посмотреть профиль Найти все сообщения от Anjik
 
Регистрация: 21.04.2020
Сообщений: 1

Мне нужно,чтобы только после нажатия по "Item1,2" появились "CItem 1,2"
<html>
<head>
</head>
<body>
<div class="Nn" >
<div class="col">
<div class="tabs">
<div class="tab">
<input type="radio" id="rd1" name="rd">
<label class="tab-label" for="rd1">Item 1</label>
<div class="tab-content">





<div class="row" >
<div class="col">

<div class="tabs">
<div class="tab">

<input type="checkbox" id="chck1" >
<label class="tab-label" for="chck1" class="chck1q" >Citem 1</label>

<div class="tab-content">
1
</div>
</div>
<div class="tab">
<input type="checkbox" id="chck2" >
<label class="tab-label" for="chck2" >CItem2</label>
<div class="tab-content">
2
</div>
</div>
</div>
</div>






</div>
</div>
<div class="tab">
<input type="radio" id="rd2" name="rd">
<label class="tab-label" for="rd2">Item 2</label>
<div class="tab-content">

</div>
</div>
<div class="tab">
<input type="radio" id="rd3" name="rd">
<label for="rd3" class="tab-close">Close others &times;</label>
</div>
</div>
</div>
</div>
</div>
<style type="text/css">

body {
color: #2c3e50;
background: #ecf0f1;
padding: 0 1em 1em;
}

h1 {
margin: 0;
line-height: 2;
text-align: center;
}

h2 {
margin: 0 0 .5em;
font-weight: normal;
}

input {
position: absolute;
opacity:0;
z-index: -1;
}

.row{
z-index:3;
display: -webkit-box;
display: flex;
}


.row .col {
-webkit-box-flex: 1;
flex: 1;
}
.row .col:last-child {
margin-left: 1em;
}

/* Accordion styles */
.tabs {

border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 4px -2px rgba(0, 0, 0, 0.5);
}

.tab {
width: 100%;
color: white;
overflow: hidden;
}
.tab-label {
display: -webkit-box;
display: flex;
-webkit-box-pack: justify;
justify-content: space-between;
padding: 1em;
background: #2c3e50;
font-weight: bold;
cursor: pointer;
/* Icon */
}
.tab-label:hover {
background: #1a252f;
}
.tab-label::after {
content: "\276F";
width: 1em;
height: 1em;
text-align: center;
-webkit-transition: all .35s;
transition: all .35s;
}
.tab-content {
max-height: 0;
padding: 0 1em;
color: #2c3e50;
background: white;
-webkit-transition: all .35s;
transition: all .35s;
}
.tab-close {
display: -webkit-box;
display: flex;
-webkit-box-pack: end;
justify-content: flex-end;
padding: 1em;
font-size: 0.75em;
background: #2c3e50;
cursor: pointer;
}
.tab-close:hover {
background: #1a252f;
}

input:checked + .tab-label {
background: #1a252f;
}
input:checked + .tab-label::after {
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
input:checked ~ .tab-content {
max-height: 100vh;
padding: 1em;


}</style>
</body>
</html>
Ответить с цитированием
Ответ



Опции темы Искать в теме
Искать в теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Следующий шаг цикла только после нажатия на клавишу RunkDowN Общие вопросы Javascript 1 09.11.2015 15:55
onkeydown/up/press на конкретном элементе Valdemor Events/DOM/Window 4 15.08.2013 21:53