There is a slider with it all ok, it is specified in the example, when using the 2nd same slider, (with different values ​​of classes and id) the arrows disappear from the first one and remain on the 2nd, what is the reason? Or that the shooters need to register what would they have both the first and second? Or you can not use one slider several times on the site and you will need to take other sliders?

#slider { /*ΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ слайдСра*/ position: relative; text-align: center; top: 10px; } #slider { /*Ρ†Π΅Π½Ρ‚Ρ€ΠΎΠ²ΠΊΠ° слайдСра*/ margin: 0 auto; } #slides article { /*всС изобраТСния справа Π΄Ρ€ΡƒΠ³ ΠΎΡ‚ Π΄ΠΎΡ€ΡƒΠ³Π°*/ width: 20%; float: left; } #slides .image { /*устанавливаСт ΠΎΠ±Ρ‰ΠΈΠΉ Ρ€Π°Π·ΠΌΠ΅Ρ€ Π±Π»ΠΎΠΊΠ° с изобраТСниями*/ width: 500%; line-height: 0; } #overflow { /*сркываСт всС, Ρ‡Ρ‚ΠΎ находится Π·Π° ΠΏΡ€Π΅Π΄Π΅Π»Π°ΠΌΠΈ этого Π±Π»ΠΎΠΊΠ°*/ width: 100%; overflow: hidden; } article img { /*Ρ€Π°Π·ΠΌΠ΅Ρ€ ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠΉ слайдСра*/ width: 100%; } #desktop:checked~#slider { /*Ρ€Π°Π·ΠΌΠ΅Ρ€ всСго слайдСра*/ max-width: 960px; /*максимальнная Π΄Π»ΠΈΠ½Π½Π°*/ } /*настройка ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΡ ΠΈ полоТСния для Π»Π΅Π²ΠΎΠΉ стрСлки*/ /*Ссли свич1-5 Π°ΠΊΡ‚ΠΈΠ²Π½Ρ‹, Ρ‚ΠΎ ΠΈΠ΄Π΅Ρ‚ ΠΎΠ±Ρ€Π°Ρ‰Π΅Π½ΠΈΠ΅ ΠΊ Π»Π΅ΠΉΠ±Π»Ρƒ ΠΈΠ· Π±Π»ΠΎΠΊΠ° с id контролс*/ #switch1:checked~#controls label:nth-child(5), #switch2:checked~#controls label:nth-child(1), #switch3:checked~#controls label:nth-child(2), #switch4:checked~#controls label:nth-child(3), #switch5:checked~#controls label:nth-child(4) { background: url('prev.png') no-repeat; /*Π·Π°Π»ΠΈΠ²ΠΊΠ° Ρ„ΠΎΠ½Π° ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠΎΠΉ Π±Π΅Π· ΠΏΠΎΠ²Ρ‚ΠΎΡ€Π΅Π½ΠΈΠΉ*/ float: left; margin: 0 0 0 -84px; /*сдвиг Π²Π»Π΅Π²ΠΎ*/ display: block; height: 68px; width: 68px; } /*настройка ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΡ ΠΈ полоТСния для ΠΏΡ€Π°Π²ΠΎΠΉ стрСлки*/ #switch1:checked~#controls label:nth-child(2), #switch2:checked~#controls label:nth-child(3), #switch3:checked~#controls label:nth-child(4), #switch4:checked~#controls label:nth-child(5), #switch5:checked~#controls label:nth-child(1) { background: url('next.png') no-repeat; /*Π·Π°Π»ΠΈΠ²ΠΊΠ° Ρ„ΠΎΠ½Π° ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠΎΠΉ Π±Π΅Π· ΠΏΠΎΠ²Ρ‚ΠΎΡ€Π΅Π½ΠΈΠΉ*/ float: right; margin: 0 -84px 0 0; /*сдвиг Π²ΠΏΡ€Π°Π²ΠΎ*/ display: block; height: 68px; width: 68px; } label, a { /*ΠΏΡ€ΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ Π½Π° стрСлки ΠΈΠ»ΠΈ ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π°Ρ‚Π΅Π»ΠΈ - курсор измСнится*/ cursor: pointer; } .all input { /*скрываСт стандартныС ΠΈΠ½ΠΏΡƒΡ‚Ρ‹ (чСкбоксы) Π½Π° страницС*/ display: none; } /*позиция изобраТСния ΠΏΡ€ΠΈ Π°ΠΊΡ‚ΠΈΠ²Π°Ρ†ΠΈΠΈ ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π°Ρ‚Π΅Π»Ρ*/ #switch1:checked~#slides .image { margin-left: 0; } #switch2:checked~#slides .image { margin-left: -100%; } #switch3:checked~#slides .image { margin-left: -200%; } #switch4:checked~#slides .image { margin-left: -300%; } #switch5:checked~#slides .image { margin-left: -400%; } #controls { /*ΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π±Π»ΠΎΠΊΠ° всСх ΡƒΠΏΡ€Π°Π²Π»ΡΡŽΡ‰ΠΈΡ… элСмСнтов*/ margin: -25% 0 0 0; width: 100%; height: 50px; } #active label { /*ΡΡ‚ΠΈΠ»ΡŒ ΠΎΡ‚Π΄Π΅Π»ΡŒΠ½ΠΎΠ³ΠΎ ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π°Ρ‚Π΅Π»Ρ*/ border-radius: 10px; /*скруглСниС ΡƒΠ³Π»ΠΎΠ²*/ display: inline-block; /*располоТСниС Π² строку*/ width: 15px; height: 15px; background: #bbb; } #active { /*располоТСниС Π±Π»ΠΎΠΊΠ° с ΠΏΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡Π°Ρ‚Π΅Π»ΡΠΌΠΈ*/ margin: 23% 0 0; text-align: center; } #active label:hover { /*ΠΏΠΎΠ²Π΅Π΄Π΅Π½ΠΈΠ΅ чСкбокса ΠΏΡ€ΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ*/ background: #76c8ff; border-color: #777 !important; /*Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ Π² любом случаС*/ } /*Ρ†Π²Π΅Ρ‚ Π°ΠΊΡ‚ΠΈΠ²Π½ΠΎΠ³ΠΎ Π»Π΅ΠΉΠ±Π»Π° ΠΏΡ€ΠΈ Π°ΠΊΡ‚ΠΈΠ²Π°Ρ†ΠΈΠΈ чСкбокса*/ #switch1:checked~#active label:nth-child(1), #switch2:checked~#active label:nth-child(2), #switch3:checked~#active label:nth-child(3), #switch4:checked~#active label:nth-child(4), #switch5:checked~#active label:nth-child(5) { background: #18a3dd; border-color: #18a3dd !important; } #slides .image { /*анимация пролистывания ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠΉ*/ transition: all 800ms cubic-bezier(0.770, 0.000, 0.175, 1.000); } #controls label:hover { /*ΠΏΡ€ΠΎΠ·Ρ€Π°Ρ‡Π½ΠΎΡΡ‚ΡŒ стрСлок ΠΏΡ€ΠΈ Π½Π°Π²Π΅Π΄Π΅Π½ΠΈΠΈ*/ opacity: 0.6; } #controls label { /*ΠΏΡ€ΠΎΠ·Ρ€Π°Ρ‡Π½ΠΎΡΡ‚ΡŒ стрСлок ΠΏΡ€ΠΈ ΠΎΡ‚Π²ΠΎΠ΄Π΅ курсора*/ transition: opacity 0.2s ease-out; } 
 <div class="all"> <input checked type="radio" name="respond" id="desktop"> <article id="slider"> <input checked type="radio" name="slider" id="switch1"> <input type="radio" name="slider" id="switch2"> <input type="radio" name="slider" id="switch3"> <input type="radio" name="slider" id="switch4"> <input type="radio" name="slider" id="switch5"> <div id="slides"> <div id="overflow"> <div class="image"> <article><img src="http://333v.ru/uploads/00/000a7db0d4c688263a3e8d09e1f5fa93.jpg"></article> <article><img src="https://million-wallpapers.com/wallpapers/6/84/484414688157351.jpg"></article> <article><img src="http://bestwallpaperhd.com/wp-content/uploads/2014/09/Angry-Cheetah.jpg"></article> <article><img src="http://img11.nnm.me/f/7/c/9/6/6a4ae327a93ca29b06ff90615ed.jpg"></article> <article><img src="http://wallpul.info/i/2016/12/wallpapers-nature-wallpaper-4k-nature-mountain-forest-landscape-fog-lake-ultrahd-4k-wallpaper-wide-hd.jpg"></article> </div> </div> </div> <div id="controls"> <label for="switch1"></label> <label for="switch2"></label> <label for="switch3"></label> <label for="switch4"></label> <label for="switch5"></label> </div> <div id="active"> <label for="switch1"></label> <label for="switch2"></label> <label for="switch3"></label> <label for="switch4"></label> <label for="switch5"></label> </div> </article> </div> 

  • one
    Add a slider call code and which slider are you using? - Shnur
  • one
    Do you change the id , name in <input /> in the second slider? If not, then all label will be controlled only by the first (or vice versa, the second, I don’t remember) slider. - Yevgeny Mironov

0