.
вкладки
Сообщений 1 страница 3 из 3
Поделиться22023-10-29 16:27:56
[html]
<div class="tabs">
<ul class="tabs__caption">
<li class="active">1-я вкладка</li>
<li>2-я вкладка</li>
</ul>
<div class="tabs__content active">
<div class="shop_plashki">
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
</div>
</div>
<div class="tabs__content">
<div class="shop_icons">
<img src="https://i.imgur.com/trtgSAo.png"> <img src="https://i.imgur.com/K6p6uEz.png"> <img src="https://i.imgur.com/zXY8A02.png"> <img src="https://i.imgur.com/L0eO69s.png"> <img src="https://i.imgur.com/9vganbW.png">
<img src="https://i.imgur.com/wx7QelP.png"> <img src="https://i.imgur.com/33JUKDL.png"> <img src="https://i.imgur.com/OhVR6nB.png"> <img src="https://i.imgur.com/rWA6dWm.png">
<img src="https://i.imgur.com/trtgSAo.png"> <img src="https://i.imgur.com/K6p6uEz.png"> <img src="https://i.imgur.com/zXY8A02.png"> <img src="https://i.imgur.com/L0eO69s.png"> <img src="https://i.imgur.com/9vganbW.png">
<img src="https://i.imgur.com/wx7QelP.png"> <img src="https://i.imgur.com/33JUKDL.png"> <img src="https://i.imgur.com/OhVR6nB.png"> <img src="https://i.imgur.com/rWA6dWm.png">
<img src="https://i.imgur.com/trtgSAo.png"> <img src="https://i.imgur.com/K6p6uEz.png"> <img src="https://i.imgur.com/zXY8A02.png"> <img src="https://i.imgur.com/L0eO69s.png"> <img src="https://i.imgur.com/9vganbW.png">
<img src="https://i.imgur.com/wx7QelP.png"> <img src="https://i.imgur.com/33JUKDL.png"> <img src="https://i.imgur.com/OhVR6nB.png"> <img src="https://i.imgur.com/rWA6dWm.png"> </div>
</div>
</div><!-- .tabs-->
<style>
.tabs__content {
display: none; /* по умолчанию прячем все блоки */
}
.tabs__content.active {
display: block; /* по умолчанию показываем нужный блок */
}
.tabs {
width: 490px;
margin: auto;
min-height: 200px;
height: auto;
}
ul.tabs__caption {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
list-style: none;
position: relative;
justify-content: center;
align-items: center;
padding-bottom: 10px;
padding: 0px 0px 10px 0px!important;
}
.tabs__caption li {
padding: 9px 15px;
margin: 1px 0 0 5px;
background: rgb(var(--coloracc));
color: rgb(var(--lightpun));
position: relative;
border-radius: 15px;
text-align: center;
}
.tabs__caption .active {
background: rgb(var(--pun_c));
color: #000;
}
.shop_icons, .shop_plashki {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.shop_icons img {
background: rgb(var(--color1)/20%);
margin: 3px;
padding: 8px;
border-radius: 30%;
}
.shop_plashki a {
background: rgb(var(--color1)/20%);
margin: 3px;
padding: 5px 10px 10px 10px;
border-radius: 10px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
(function($) {
$(function() {
$('ul.tabs__caption').on('click', 'li:not(.active)', function() {
$(this)
.addClass('active').siblings().removeClass('active')
.closest('div.tabs').find('div.tabs__content').removeClass('active').eq($(this).index()).addClass('active');
});
});
})(jQuery);
</script>
[/html]
Поделиться32023-10-29 17:09:27
[html]<div style="background: blanchedalmond; padding-bottom: 1px; border-radius: 30px; margin: auto; width: 600px;">
<div style="background: #f92672;padding-bottom: 1px;border-radius: 30px;width: 600px;height: 169px;">
<div style="margin: auto; position: relative; top: 20px; font: var(--t2); font-size: 15px; margin-bottom: 10px; margin-left: 30px;">Магазин</div>
<div style="margin: auto;top: 20px;display: flex;position: relative;left: 30px;align-items: center;justify-content: flex-start;flex-wrap: nowrap;flex-direction: row;">
<div style="background:url(https://i.pinimg.com/564x/a5/78/cf/a578 … 6d8468.jpg);width: 100px;height: 100px;background-size: cover;background-position: center;border-radius: 100%;"></div>
<div style="margin-left: 10px;width: 70%;text-align: justify;background: azure;padding: 10px;">Хочешь порадовать себя или друга? Хочешь подчеркнуть свою индивидуальность? Наш магазин к вашим услугам!<br>
Здесь ты можешь купить иконку или плашку для себя или в подарок, заказать любую услугу.<br>
Для совершения покупки нужно лишь заполнить простенький шаблон.</div>
</div>
<div class="tabs">
<ul class="tabs__caption">
<li class="active">1-я вкладка</li>
<li>2-я вкладка</li>
</ul>
<div class="tabs__content active">
<div class="shop_plashki">
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
<a href=""><div class="l_pl" style="background:url(https://i.imgur.com/dhYZcsa.jpg);"> <up>Frankly, my dear, </up> <down>I don’t give a damn.</down> </div></a>
</div>
</div>
<div class="tabs__content">
<div class="shop_icons">
<img src="https://i.imgur.com/trtgSAo.png"> <img src="https://i.imgur.com/K6p6uEz.png"> <img src="https://i.imgur.com/zXY8A02.png"> <img src="https://i.imgur.com/L0eO69s.png"> <img src="https://i.imgur.com/9vganbW.png">
<img src="https://i.imgur.com/wx7QelP.png"> <img src="https://i.imgur.com/33JUKDL.png"> <img src="https://i.imgur.com/OhVR6nB.png"> <img src="https://i.imgur.com/rWA6dWm.png">
<img src="https://i.imgur.com/trtgSAo.png"> <img src="https://i.imgur.com/K6p6uEz.png"> <img src="https://i.imgur.com/zXY8A02.png"> <img src="https://i.imgur.com/L0eO69s.png"> <img src="https://i.imgur.com/9vganbW.png">
<img src="https://i.imgur.com/wx7QelP.png"> <img src="https://i.imgur.com/33JUKDL.png"> <img src="https://i.imgur.com/OhVR6nB.png"> <img src="https://i.imgur.com/rWA6dWm.png">
<img src="https://i.imgur.com/trtgSAo.png"> <img src="https://i.imgur.com/K6p6uEz.png"> <img src="https://i.imgur.com/zXY8A02.png"> <img src="https://i.imgur.com/L0eO69s.png"> <img src="https://i.imgur.com/9vganbW.png">
<img src="https://i.imgur.com/wx7QelP.png"> <img src="https://i.imgur.com/33JUKDL.png"> <img src="https://i.imgur.com/OhVR6nB.png"> <img src="https://i.imgur.com/rWA6dWm.png"> </div>
</div>
</div><!-- .tabs-->
</div>[/html]