I tried and I want to cancel the border radius of the class .title { border-radius: 0 }
When the div hits its top position at 6.3vh
.
I tried, searched, but I can’t find anything that works.
I tried with media queries and pseudo class without results..
Only with, css or sass /
html,
body {
margin: 0;
padding: 0;
}
.wrapper {
height: auto;
margin: 0 10vh;
font-size: 3rem;
background: red;
}
header {
width: 100%;
height: 6.3vh;
background: orange;
display: flex;
justify-content: center;
align-items: top;
position: sticky;
top: 0;
z-index: 4;
}
.header_title {
background: blue;
}
main {
width: 100%;
background: green;
display: flex;
flex-direction: column;
align-items: center;
position: sticky;
top: 6.3vh;
z-index: 3;
}
.image {
width: 100%;
height: 53.7vh;
background: burlywood;
position: sticky;
top: 6.3vh;
z-index: 1;
}
.title {
background: purple;
border-radius: 20px 20px 0 0;
position: sticky;
top: 6.3vh;
z-index: 3;
}
.cards {
background: pink;
width: 100%;
position: sticky;
z-index: 2;
top: 60vh;
margin-bottom: 40vh;
;
}
footer {
width: 1 height: 40vh;
background: grey;
display: flex;
justify-content: center;
align-items: top;
position: sticky;
z-index: 3;
}
<div class="wrapper">
<header>
<div class="header_title">HEADER</div>
</header>
<main>
<div class="image">IMAGE</div>
<div class="title">MAIN</div>
<div class="cards">
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
<div class="card">CARD</div>
</div>
</main>
<footer>
FOOTER
</footer>
</div>
2
Answers
Finally I found a trick to make it work. Thank you for your feedback.