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>
id,namein<input />in the second slider? If not, then alllabelwill be controlled only by the first (or vice versa, the second, I donβt remember) slider. - Yevgeny Mironov