как реализовать данный блок?
Ответы (1 шт):
Автор решения: soledar10
→ Ссылка
Пример
body {
margin: 0;
padding: 2rem;
}
.section {
background: #282828 url(https://placeimg.com/1000/1000/arch) no-repeat center top / cover;
padding: 2rem;
display: flex;
align-items: center;
min-height: 100vh;
box-sizing: border-box;
position: relative;
border-radius: .5rem;
overflow: hidden;
}
.section::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 50%;
height: 100%;
background-color: #282828;
clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%);
}
.section__content {
position: relative;
z-index: 1;
max-width: 45%;
}
.section__title {
color: #fff;
font-size: 2.25rem;
margin-top: 0;
}
.section__btn {
display: inline-block;
background-color: red;
padding: 1rem 2rem;
color: #fff;
}
@media (max-width: 991px) {
.section::before {
width: 60%;
}
}
@media (max-width: 767px) {
.section__title {
font-size: 1.75rem;
}
}
<section class="section">
<div class="section__content">
<h1 class="section__title">Lorem ipsum dolor sit amet, ipsum dolor sit amet, consectetur adipisicing elit.</h1>
<a href="#" class="section__btn">Button text text text text</a>
</div>
</section>
