Build mobile menu CSS only project | 3d CSS project for beginner

css only project
css only project

Hi, welcome here in this tutorial we are going to develop a mobile menu, a CSS-only project so let’s start it.

Here is your index.html file, copy the code below and paste it into index.html.

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

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Mobile menu</title>
    <link rel="stylesheet" href="style.css">

    <div class="container">
        <input type="checkbox" class="toggle" id="toggle" checked="checked" />
        <label for="toggle" class="toggle">Tilt it</label>
        <div class="menu">
            <div class="top">
                <span class="search">
                    <input type="text">
                <a href="#" class="exit" tabindex="0"></a>
            <ul class="middle">
                <li tabindex="0">Google</li>
                <li tabindex="0">Facebook</li>
                <li tabindex="0">Twitter</li>
                <li tabindex="0">LinkedIn</li>
                <li tabindex="0">Instagram</li>
                <li tabindex="0">Amazon</li>
                <li tabindex="0">Netflix</li>
                <li tabindex="0">Meta</li>
            <div class="bottom"></div>
            <div class="menu-back"></div>


Here is your code for the App.css file:

    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;

    height: 100vh;
    background-image: linear-gradient(135deg,  #43a1f8 10%, #671dc7 100%);

    position: relative;
    width: 250px;
    height: 80px;
    display: grid;
    place-items: center;
    background-image: linear-gradient(135deg, rgb(117, 29, 189) 10%, rgb(30, 138, 210) 100%);
    color: white;
    border-radius: 80px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    border-top: 2px solid #e6e6fa;
    border-left: 2px solid #e6e6fa;
    padding-left: 60px;
    overflow: hidden;
    transition: 0.5s ease-in-out;

    padding-left: 0px;
    padding-right: 60px;
    color: white;

.btn span {
    position: absolute;
    display: grid;
    place-items: center;
    left: 5px;
    width: 70px;
    height: 70px;
    background-image: linear-gradient(135deg, rgb(200, 200, 200), rgb(250, 250, 250));
    color: #000;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bolder;
    transition: 0.5s cubic-bezier(0.4, 0, 1, 1);
.btn:hover span{
    left: calc(100% - 76px);

    position: absolute;
    content: "";
    width: 80px;
    height: 100%;
    z-index: 1;
    background: rgb(255, 255, 255, 0.4);
    transform: translateX(-175px) skew(25deg);
    transition: 0.75s ease-in-out;

.btn:hover::after {
    transform: translateX(175px) skew(25deg);

After writing the code into the files (don’t forget to save it ?,) and then open your HTML file in the browser.

Here is a complete tutorial on building a mobile menu app in CSS only.