CSS - Add gradient bg on box with :after

0 votes
140 views
added Mar 7, 2022 in CSS by lcjr First Warrant Officer (11,530 points)
.narrative-page-top {
    &:after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0px;
        top: 0px;
        background: linear-gradient(rgba(7, 22, 38, 0) 50%, rgb(7, 19, 36) 100%);
        z-index: 1;
    }
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...