Home > OS >  How make a perfect curve with css?
How make a perfect curve with css?

Time:06-04

I want to create my navbar something like this

Navbar

And this is what I have created one side div container but the curves are not perfect of my div and i need to make this for both sides for both side I will use flex box but my main focus is to create that same curves.

<!doctype html>
<html lang="en">

<head>
    <title>Title</title>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>

<body>



    <style>
        .left {
            border-radius: 0px 5px 100px 0px / 100px 30px 100px 0px;
            border: 0px solid #800000;
            background-color: red;
            padding: 10px;
            height: 100px;
            width: 500px;
        }
    </style>

    <div >
        s
    </div>



</body>

</html>

Thank you.

CodePudding user response:

This should work here you go :)

The website you gave uses .svg images to create this curve effect.

And with display: flex; makes them inline.

<body>
    <style>
        * {
            padding: 0;
            margin: 0;
            background: black;
        }

        .navbar {
            display: flex;
        }

    </style>
    <div >
        <div >
            <img src="https://techfest.org/2021/home/Navbar/Logo.svg">
        </div>
        <div >
            <img src="https://techfest.org/2021/home/Navbar/TN.svg">
        </div>
    </div>
</body>

CodePudding user response:

This will need Javascript, search for burger navbar CSS design using Javascript on YouTube.

  • Related