Curved Header or Shape Using Only HTML & CSS

yotube
0


 

Example :)


Source Code :)

HTML:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" type="text/css" href="style.css">

    <title>Curved Shape Using Only HTML & CSS</title>
</head>
<body>
    <div class="curved">
        <div class="content">
            <h2>Curved Shape Using Only HTML & CSS - Pure Coding</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
            consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
            proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    </div>
</body>
</html>

 

CSS:

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    width: 100%;
    min-height: 1000px;
}

.curved {
    width: 100%;
    height: 100vh;
    position: relative;
    padding: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.curved::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, royalblue, tomato);
    z-index: -1;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    transform: scaleX(1.5);
}

.curved .content {
    width: 900px;
    color: white;
    text-align: center;
}

.curved .content h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.curved .content p {
    font-size: 1rem;
}

 

Video:

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top