There is a gallery code on css3 for a one-page site. Three pictures in three rows. When you click the picture increases on top of the other images. Everything works well, but. I need that when I hover over the picture it is covered with a blue translucent background with the text, and afterwards, when pressed, it unfolded. But this is not how I come to realize. PS It seems to be properly designed.
/*Π£Π±ΠΈΡΠ°Π΅ΠΌ ΡΠ°ΠΌΠΊΡ ΡΠΎΠΊΡΡΠ°*/ :focus { outline: none; } /*ΠΡΠ½ΠΎΠ²Π½ΠΎΠΉ Π±Π»ΠΎΠΊ*/ .gallery { width: 980px; margin: 0 auto; position: relative; } /*ΡΡΡΠ»ΠΊΠΈ-ΠΊΠΎΠ½ΡΠ΅ΠΉΠ½Π΅ΡΡ*/ .gallery a { margin: 0; padding: 10px; display: inline-block; height: 130px; position: relative; width: 300px; } /*ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Π²Π½ΡΡΡΠΈ ΡΡΡΠ»ΠΎΠΊ*/ .gallery a img { margin: 0; padding: 10px; cursor: pointer; display: block; left: 0px; width: 300px; height: 130px; position: absolute; top: 10px; z-index: 1; } /*ΡΡΡΠ»ΠΊΠ° ΠΏΠΎΠ»ΡΡΠ°Π΅Ρ ΡΠΎΠΊΡΡ ΠΈ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠ° ΡΠ°Π·Π²ΠΎΡΠ°ΡΠΈΠ²Π°Π΅ΡΡΡ*/ .gallery a:focus img { border: none; margin: 0; padding: 0; border: 2px solid rgb(153, 153, 153); border-radius: 3px; cursor: default; height: 300%; width: 300%; position: absolute; z-index: 25; transition-duration: 0.7s; } /*ΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΊΠ°ΠΆΠ΄ΠΎΠΉ ΡΠ°Π·Π²ΡΡΠ½ΡΡΠΎΠΉ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ*/ .gallery a:focus:nth-child(3n+1) img { left: 0; top: -145px; } .gallery a:focus:nth-child(3n+2) img { left: -315px; top: -145px; } .gallery a:focus:nth-child(3n+3) img { left: -640px; top: -145px; } .gallery a:focus:nth-child(-n+3) img { top: 10px; } .gallery a:focus:nth-child(n+7) img { top: -300px; } .gallery a:focus:nth-child(n+10) img { top: -300px; } /*ΠΊΠ½ΠΎΠΏΠΊΠ° Π·Π°ΠΊΡΡΡΠΈΡ ΠΈ ΡΠ±ΡΠΎΡΠ° ΡΠΎΠΊΡΡΠ°*/ .closed { background-color: rgb(250, 75, 21); position: absolute; top: -5px; right: 20px; display: none; width: 30px; height: 30px; cursor: pointer; z-index: 30; } /*ΡΠ΅ΠΊΡΡ Π²Π½ΡΡΡΠΈ ΠΊΠ½ΠΎΠΏΠΊΠΈ Π·Π°ΠΊΡΡΡΠΈΡ*/ .closed p { margin: 10px 8px; font-size: 10px; color: rgb(255, 255, 255); position: absolute; } /*ΠΏΡΠΎΠ·ΡΠ°ΡΠ½ΡΠΉ Π±Π»ΠΎΠΊ ΠΏΠΎΠ²Π΅ΡΡ
ΡΠ°Π·Π²ΡΡΠ½ΡΡΠΎΠΉ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Π΄Π»Ρ Π·Π°ΠΊΡΡΡΠΈΡ*/ .closed-layer { display: none; position: absolute; top: 100px; left: 100px; width: 800px; height: 400px; background: transparent; z-index: 30; } /*Π±Π»ΠΎΠΊΠΈ Π·Π°ΠΊΡΡΡΠΈΡ ΠΏΠΎΠ»ΡΡΠ°ΡΡ ΡΠΎΠΊΡΡ*/ a:focus~.closed, a:focus~.closed-layer { display: block; transition-duration: 4s; } <div id="bottom"> <div class="container" id="container"> <div class="gallery"> <a tabindex="1"> <img src="image/nor1.jpg"> </a> <a tabindex="1"> <img src="image/nor2.jpg"> </a> <a tabindex="1"> <img src="image/nor3.jpg"> </a> <a tabindex="1"> <img src="image/nor4.jpg"> </a> <a tabindex="1"> <img src="image/nor5.jpg"> </a> <a tabindex="1"> <img src="image/nor6.jpg"> </a> <a tabindex="1"> <img src="image/nor7.jpg"> </a> <a tabindex="1"> <img src="image/nor8.jpg"> </a> <a tabindex="1"> <img src="image/nor9.jpg"> </a> <span class="closed"><p><i class="icon-cancel"></i></p></span> <span class="closed-layer"></span> </div> </div> </div>