Вопрос по форматированию блока(блоков) от чайника
Коллеги, я не волшебник, а только учусь, потому вопрос из двух составляющих:
Есть контейнер блоков:
С их отрисовкой и размещением я разобрался, но встал в ступор на двух вещах:
Отрисовка символа ">" на каждом из блоков.
Головой я понимаю, что это делается через Flex со смещением право, если не хватает высоты блока, но вот как конкретно реализовать - не хватает мозгов.(поэтому просто сделал отступ справа, чтобы не сползло форматирование текста внутри)
И, вторая часть вопроса: скорее всего можно описать свойства всех блоков(я прибивал текст кв верзу и низу через space between) менее громоздко, чем у меня, но я пока не понимаю как, поэтому для каждого блока описывал отдельно.
.infobox {
width: 1440px;
position: relative;
margin-top: -117px;
margin-left: 43px;
/* padding: 57px 57px; */
display: flex;
}
.infoblock1, .infoblock2, .infoblock3, .infoblock4 {
display: flex;
flex-wrap: wrap;
width: 315px;
padding: 20px 80px 20px 20px ;
height: 380px;
margin-right: 12px;
margin-left: 12px;
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
background-color: #4073de;
color: white;
align-content: space-between;
justify-content: center;
}
.infoblock1 {
background-image: linear-gradient(to bottom, #f2b417, #ff912a);
}
.infoblock1 p1{
font-size: 40px;
font-weight: 500;
}
.infoblock1 p2{
font-size: 19px;
}
.infoblock2 {
background-image: linear-gradient(to bottom, #927bfd, #407bda);
}
.infoblock2 p1{
font-size: 40px;
font-weight: 500;
}
.infoblock2 p2{
font-size: 19px;
}
.infoblock3 {
background-image: linear-gradient(to bottom, #cf5d80, #ff31a1);
}
.infoblock3 p1{
font-size: 40px;
font-weight: 500;
}
.infoblock3 p2{
font-size: 19px;
}
.infoblock4 {
background-image: linear-gradient(to bottom, #fe14e7, #b71fe0);
}
.infoblock4 p1{
font-size: 40px;
font-weight: 500;
}
.infoblock4 p2{
font-size: 19px;
}
<div class="infobox">
<div class="infoblock1">
<p1>Register for swim lessons</p1>
<p2>Our experienced instructors offer a variety of swimming lessons for children and teens.</p2>
</div>
<div class="infoblock2">
<p1>Franchise Opportu­nities</p1>
<p2>Swimming School Franchise is posi­tioned as the leader in the thriving chil­dren's education</p2>
</div>
<div class="infoblock3">
<p1>What Level Is My Child?</p1>
<p2>Use our Level Finder to determine your swimmer's level or call us for any assis­tance you need!</p2>
</div>
<div class="infoblock4">
<p1>Locate a Swim School</p1>
<p2>Use our Level Finder to determine your swimmer's level or call us for any assis­tance you need!</p2>
</div>
</div>
Заранее благодарен
Источник: Stack Overflow на русском