Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Resturant</title>
    <link rel="stylesheet" href="main.css">
    <script src="https://kit.fontawesome.com/332a215f17.js" crossorigin="anonymous"></script>
    <link href="https://fonts.googleapis.com/css?family=Baloo+Chettan+2:400,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./magnific/magnific-popup.css">
</head>
<body>
    <!--Nav bar-->
   
    <div id="menu" class="menu">
        <div id="menu-bar" onclick="onClickMenu()">
        <div id="bar1" class="bar"></div>
        <div id="bar2" class="bar"></div>
        <div id="bar3" class="bar"></div>
   
    <ul id="nav" class="nav">
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Menu</a></li>
        <li><a href="#">Contact</a></li>
    </ul>
    </div>
</div>
    <!--End of Nav bar-->
    <!--Header===-->
    <header class="header">
        <div class="hero">
            <h1 class="title">Food For Health</h1>
            <a href="#" class="hero-button pulsate">Book a table</a>
  
    </header>
    <!--End of Header==================-->
     <!---=====About Section=====-->
      <section id="about">
       <div>
       <h2 class="title-text">About Us</h2>
    </div>
    <div class="about-center">
        <!---Single item-->
        <article class="about">
            <div class="about-icon"><i class="fas fa-mug-hot"></i></div>
            <div class="about-text">
                <h2 class="about-subtitle">Drinks</h2>
                <p class="about-info">Lorem ipsum dolor sit amet, consectetur 
                adipisicing elit. Quisquam, temporibus!</p>
            </div>
        </article>
        <!--End of single item-->
        <!---Single item-->
        <article class="about">
            <div class="about-icon"><i class="fas fa-utensils"></i></div>
            <div class="about-text">
                <h2 class="about-subtitle">Healthy Food</h2>
                <p class="about-info">Lorem ipsum dolor sit amet, consectetur 
                adipisicing elit. Quisquam, temporibus!</p>
            </div>
        </article>
        <!--End of single item-->
        <!---Single item-->
        <article class="about">
            <div class="about-icon"><i class="fas fa-mortar-pestle"></i></div>
            <div class="about-text">
                <h2 class="about-subtitle">Organic Food</h2>
                <p class="about-info">Lorem ipsum dolor sit amet, consectetur 
                adipisicing elit. Quisquam, temporibus!</p>
            </div>
        </article>
        <!--End of single item-->
        <!---Single item-->
        <article class="about">
            <div class="about-icon"><i class="fas fa-drumstick-bite"></i></div>
            <div class="about-text">
                <h2 class="about-subtitle">White Meat</h2>
                <p class="about-info">Lorem ipsum dolor sit amet, consectetur 
                adipisicing elit. Quisquam, temporibus!</p>
            </div>
        </article>
        <!--End of single item-->
        <!---Single item-->
        <article class="about">
            <div class="about-icon"><i class="fas fa-fish"></i></div>
            <div class="about-text">
                <h2 class="about-subtitle">Sea Food</h2>
                <p class="about-info">Lorem ipsum dolor sit amet, consectetur 
                adipisicing elit. Quisquam, temporibus!</p>
            </div>
        </article>
        <!--End of single item-->
        <!---Single item-->
        <article class="about">
            <div class="about-icon"><i class="fas fa-pepper-hot "></i></div>
            <div class="about-text">
                <h2 class="about-subtitle">Hot & Spicy</h2>
                <p class="about-info">Lorem ipsum dolor sit amet, consectetur 
                adipisicing elit. Quisquam, temporibus!</p>
            </div>
        </article>
        <!--End of single item-->
    </div>   
   </section>

   <!--=====End of About Section============-->
   <!---Menu Section---=========-->
   <section class="menu" id="menu">
       <article class="menu-image"></article>
       <article class="menu-text">
           <div class="menu-text-center">
               <h1>Our Menu</h1>
               <p>Lorem ipsum dolor, sit amet consectetur adipisicing 
                elit. Aut omnis nam iusto praesentium inventore vitae 
                esse tempora repellendus.</p>
                <a href="#">Explore</a>
           </div>
       </article>
   </section>
   <!---End of Menu Section============-->
   
   <!---Social Icons-->
   <section id="social-icons">
       <a href="#"><i class="fab fa-facebook facebook"></i></a>
       <a href="#"><i class="fab fa-twitter twitter"></i></a>
       <a href="#"><i class="fab fa-instagram instagram"></i></a>
       <a href="#"><i class="fab fa-google-plus plus"></i></a>
   </section>
   <!--End of Social Icons-->
   <!----------============Counter / Numbers-===================-->
      <section id="numbers">
       <article class="number">
           <i class="fas fa-cloud-meatball"></i>
           <p>50</p>
          <h3> Meat dishes</h3>
        </article>
        <article class="number">
            <i class="fas fa-cheese"></i>
            <p>35</p>
           <h3> Cheese Variations</h3>
         </article>
         <article class="number">
            <i class="fas fa-pizza-slice"></i>
            <p>25</p>
           <h3> Pizzas</h3>
         </article>
         <article class="number">
            <i class="fas fa-ice-cream"></i>
            <p>40</p>
           <h3> Desserts</h3>
         </article>
   </section>
   <!--End of Counter===================-->
   <!--=======-----------Card Section-----====================-->
   <section id="food">
       <div>
       <h2 class="title-text"> Food Fusion</h2>
        </div>
      <div class="food-container">
              <!--======Card Start ----============-->
      <article class="food-card">
              <img src="https://images.pexels.com/photos/574111/pexels-photo-574111.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2" class="food-img"alt="">
              <div class="img-text">
                  <h1>Breakfast</h1>
              </div>
              <div class="img-footer">
                  <div class="footer-icon">
                    <i class="fas fa-dollar-sign">25</i>
                  </div>
                  <div class="footer-btn">
                    <button type="button"class="food-btn">Order Now</button>  
                  </div>
              </div>
              </article>
              <article class="food-card">
                <img src="https://images.pexels.com/photos/14457194/pexels-photo-14457194.jpeg?auto=compress&cs=tinysrgb&w=600" class="food-img"alt="">
                <div class="img-text">
                    <h1>Lunch</h1>
                </div>
                <div class="img-footer">
                    <div class="footer-icon">
                      <i class="fas fa-dollar-sign">35</i>
                    </div>
                    <div class="footer-btn">
                      <button type="button"class="food-btn">Order Now</button>  
                    </div>
                </div>
                </article>
                <article class="food-card">
                    <img src="https://images.pexels.com/photos/410648/pexels-photo-410648.jpeg?auto=compress&cs=tinysrgb&w=600" class="food-img"alt="">
                    <div class="img-text">
                        <h1>Dinner</h1>
                    </div>
                    <div class="img-footer">
                        <div class="footer-icon">
                          <i class="fas fa-dollar-sign">45</i>
                        </div>
                        <div class="footer-btn">
                          <button type="button"class="food-btn">Order Now</button>  
                        </div>
                    </div>
                    </article>
       </div>
       
      
       
   </section>
       <!--======End of Card =========-->

     <!--=====End of Card Section=================-->
       <!--Gallery Section====================-->
    <section id="gallery">
        <div>
        <h2 class="title-text">Main Cuisines</h2>
     </div>
     <div id="gallery-center">
         <article class="gallery-item">
             <a href="https://images.pexels.com/photos/842142/pexels-photo-842142.jpeg?auto=compress&cs=tinysrgb&w=600g">
                <img src="https://images.pexels.com/photos/842142/pexels-photo-842142.jpeg?auto=compress&cs=tinysrgb&w=600" alt="">
            </a>
         </article>
         <article class="gallery-item">
            <a href="https://images.pexels.com/photos/842545/pexels-photo-842545.jpeg?auto=compress&cs=tinysrgb&w=600">
                <img src="https://images.pexels.com/photos/842545/pexels-photo-842545.jpeg?auto=compress&cs=tinysrgb&w=600" alt="">
            </a>
        </article>
        <article class="gallery-item">
            <a href="https://images.pexels.com/photos/769289/pexels-photo-769289.jpeg?auto=compress&cs=tinysrgb&w=600">
                <img src="https://images.pexels.com/photos/769289/pexels-photo-769289.jpeg?auto=compress&cs=tinysrgb&w=600" alt="">
            </a>
        </article>
        <article class="gallery-item">
            <a href="https://images.pexels.com/photos/3850838/pexels-photo-3850838.jpeg?auto=compress&cs=tinysrgb&w=600">
                <img src="https://images.pexels.com/photos/3850838/pexels-photo-3850838.jpeg?auto=compress&cs=tinysrgb&w=600" alt="">
            </a>
        </article>
        <article class="gallery-item">
            <a href="https://images.pexels.com/photos/1263870/pexels-photo-1263870.jpeg?auto=compress&cs=tinysrgb&w=600">
                <img src="https://images.pexels.com/photos/1263870/pexels-photo-1263870.jpeg?auto=compress&cs=tinysrgb&w=600" alt="">
            </a>
        </article>
        <article class="gallery-item">
            <a href="https://images.pexels.com/photos/2773940/pexels-photo-2773940.jpeg?auto=compress&cs=tinysrgb&w=600">
                <img src="https://images.pexels.com/photos/2773940/pexels-photo-2773940.jpeg?auto=compress&cs=tinysrgb&w=600">
            </a>
        </article>
        <article class="gallery-item">
            <a href="https://images.pexels.com/photos/858508/pexels-photo-858508.jpeg?auto=compress&cs=tinysrgb&w=600">
                <img src="https://images.pexels.com/photos/858508/pexels-photo-858508.jpeg?auto=compress&cs=tinysrgb&w=600" alt="">
            </a>
        </article>
        <article class="gallery-item">
            <a href="https://images.pexels.com/photos/2059151/pexels-photo-2059151.jpeg?auto=compress&cs=tinysrgb&w=600">
                <img src="https://images.pexels.com/photos/2059151/pexels-photo-2059151.jpeg?auto=compress&cs=tinysrgb&w=600" alt="">
            </a>
        </article>
     </div>
     </section>
       <!---End of Gallery Section===========-->
       <!---footer========-->
       <footer class="footer">

        <div class="section-center">
            <p class="text">
                &copy; <span>Food For Health</span> 
            </p>
        </div>

       </footer>

       
  
     
   



     




<script src="onClickMenu.js"></script>
<!--Magnific POPup Jquery also-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="magnific/jquery.magnific-popup.min.js"></script>
<script src="magnific/magnific.js"></script>
</body>
</html>
              
            
!

CSS

              
                *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.title-text{
    font-size: 40px;
    text-align: center;
}
body{
    font-family: 'Baloo Chettan 2', cursive;
    line-height: 1.5;
}
/*navbar*/
#menu-bar{
    width: 50px;
    height: 10px;
    margin: 50px 10px 10px 20px;
    position:fixed;
    cursor: pointer;
    z-index: 1;
}
  
.bar{
    background:orange;
    border-radius: 10%;
    transition: .4s;
}
#bar1{
    width:40px;
    height: 10px;
    transform: translateY(-4px);
}
#bar2{
    width: 40px;
    height: 10px;
}
#bar3{
    width: 40px;
    height: 10px;
    transform: translateY(4px);
}
.change .bar{
    background: #fff;
}
.change #bar1{
    transform: translateY(6px);
    rotate: z(45deg);
}
.change #bar3{
    transform: translateY(-15px);
    rotate: z(-45deg);
}
.change #bar2{
    opacity: 0;
}
.nav li a{
    text-decoration: none;
    color: orange;
    font-size: 30px;
    text-transform:uppercase ;
    font-weight: bold;
   
}
.nav li a:hover{
    color: #fff;
    background: orange;
    padding-left: 10px;
}
.nav li{
    margin: 20px 10px 10px 20px;
    padding-top: 10px;
    list-style-type:none;
}
.nav{
    display: none;
    
}
.change-btn{
    display: block;
}

/*header*/
.header{
   /* display: flex;*/
    min-height: 100vh;
     background:linear-gradient(rgba(0,0,0,0.3),rgba(0,0,0,0.4)),
     url(https://images.pexels.com/photos/372882/pexels-photo-372882.jpeg)center/cover no-repeat fixed;
    /* flex-direction: column;*/
    margin-top: auto; 
}
.hero{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    background-attachment: fixed;
    width: 100%;
    height: 100%;
}
.hero .title{
    color: #fff;
    font-size: 50px;
}
.hero-button{
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
    padding: 13px 20px;
    border-radius: 200px;
    font-weight: bold;
    background: orange;
    color:#fff;
    cursor: pointer;
    border: 2px solid orange;
    margin-top:10px;
  
}
.hero-button:hover{
    background: #fff;
    color: orange;
    border: none;
    

}
.pulsate{
    /*-webkit-*/animation: pulsate 3s ease-in-out;
    /*-webkit-*/animation-iteration-count:infinite ;
    opacity: .3;
    color: black;
}
@-webkit-keyframes pulsate{
    0% {
        opacity: .3;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: .3;
    }

}

/* End of header*/
/*==========About Section============*/
#about{
    padding: 40px;
}

.about{
    margin: 30px 0;
    display: flex;
}
.about-icon .fas{
    font-size: 60px;
    color: orange;
    margin-right: 20px;
}
.about-subtitle{
    text-transform: capitalize;
    color: orange;
    font-size: 25px;
}
.about-info{
    margin-top: 10px;
    line-height: 1.5;
}
.about-icon:hover .fas,
.about-subtitle:hover{
 transition: transform 2s ease, color 2s ease;
 transform: translateY(-10px);
    color: #cd6100;
    cursor: pointer;
}
@media screen and (min-width: 576px){
    .about-center{
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .about{
        flex: 0 0 calc(50% - 16px);
    }
}
@media screen and (min-width:972px){
    .about{
        flex: 0 0 calc(33.3% - 16px);
    }
}
/*=====end of Icon Section======*/
/*=====Menu Section======*/
.menu-image{
    min-height: 80vh;
    background: url(https://images.pexels.com/photos/806361/pexels-photo-806361.jpeg?auto=compress&cs=tinysrgb&w=600) center/cover fixed no-repeat;
}
.menu-text{
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: orange;
    columns: #0000;
    padding: 40px 0;
}
.menu-text-center{
    width: 90%;
    margin: 0 auto;
}
.menu-text h1{
    font-size: 40px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.menu-text p{
    margin: 20px 0;
    line-height: 2;
}
.menu-text a{
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
    padding: 13px 20px;
    border-radius: 200px;
    font-weight: bold;
    background: rgb(10, 10, 10);
    color:orange;
    cursor: pointer;
    border: 2px solid #000;
    margin-top:10px;
}
.menu-text a:hover{
    color:orange;
    background: #fff;
    border:none;

}
@media screen and (min-width:776px){
    .menu{
        display: flex;
    }
    .menu-text{
        flex: 0 0 30%;
    }
    .menu-image{
        flex: 0 0 70%;
        clip-path: polygon(0 0, 100% 0, 50% 100%, 0 100%)
    }
    .menu{
        background: orange;
    }
}
/*========End of Menu Section====*/


/*==========Social Icons====*/

#social-icons{
 height: 150px;
   background:#fff;
    text-align: center;
   /* clip-path: polygon(0 0, 100% 0, 100% 100%, 0 40%);*/
    padding: 50px 0 50px 0;
}
#social-icons a{
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    font-size: 40px;
    border-radius:5px;
    transition: transform 2s ease, color 2s ease;
}
#social-icons a:hover{
    transform: translateY(-20px);
}
.facebook{
    color: #3b5998;
}
.twitter{
  color:  #38A1F3;
}
.instagram{
 color:   #e1306c;
}
.plus{
    color:#db4a39;
}
/*====end of Social Icons======*/
/*==========Numbers/ Counters=======*/
.number{
    text-align: center;
    background:linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.4)),
     url('https://images.pexels.com/photos/941869/pexels-photo-941869.jpeg?auto=compress&cs=tinysrgb&w=600') center/cover fixed no-repeat;
    padding: 60px 0;
    color:#fff;
 }
 .number p{
     font-size: 30px;
     font-weight: bold;
 }
.number:hover{
    color: orange;
}
.number .fas{
    font-size: 60px;
    margin: 20px 0;
}
.number h3{
    text-transform: uppercase;
}
@media screen and (min-width:576PX){
    #numbers {
        display: grid;
    grid-template-columns: 1fr 1fr;
    }
}
@media screen and (min-width: 992px){
    #numbers{
        grid-template-columns: repeat(4, 1fr);
    }
}
/*==========Cards Section========*/
#food{
    padding: 20px ;
}
.food-container{
     max-width: 90vw;
    margin: 0 auto;
}
.food-card{
    position: relative;
    background: linear-gradient(rgba(205, 96, 0, 0.7),rgba(205,96,0,0.7));
    margin:20px 0;
    color: #000;
    overflow: hidden;
    padding: 3px;
    border-radius: 16px;
    border: 1px solid orange;
    box-shadow: 2px 3px 1px 1px #cd6100;
}

#food img{
    width: 100%;
    min-height: 100%;
    display: block;
    transition: transform 4s;
}

.img-text{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 4s;

}
.img-footer{
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 10px;
    font-size: 20px;
    opacity: 0;
    color: #000;
    transition: opacity 4s;
}
.img-text h1{
    font-size: 30px;
    margin-bottom: 10px;
}
.food-card:hover img{
    opacity: 0.4;
    transform: scale(1.3);
}
.food-card:hover .img-text,
.food-card:hover  .img-footer{
    opacity:1;
}
.food-btn{
    display: inline-block;
    background:#000;
    text-decoration: none;
    text-transform: capitalize;
    padding: 12px 32px;
    color: #fff;
    font-weight: bold;
    border-radius: 180px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s ease-in-out;
    font-size:18px;
    outline:none;
}
.food-btn:hover{
    color: orange;
    background:#ffff;
    border: #000;
    outline: none;
}
.fas{
    font-size: 30px;
}
@media screen and (min-width: 576px){
    .food-container{
       display: grid;
       grid-template-columns: repeat(2, 1fr);
       grid-column-gap: 16px;
    }
}
@media screen and (min-width: 992px){
    .food-container{
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     grid-column-gap:16px ;
    }
}
/*========End of Cards Section=======*/
/*=========Gallery Section============*/
#gallery{
    padding: 40px;
    background: #fff;
}
.gallery-item{
    background: linear-gradient(rgb(rgba(241, 161, 13)) rgb(rgb(255, 165, 0)));
}
.gallery-item img{
    display:block;
    width: 100%;
    opacity: 1;
    transition: opacity 2s ease;
}
.gallery-item img:hover{
    opacity: 0.5;
}
@media screen and (min-width:576px){
    #gallery-center{
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
@media screen and (min-width:992px){
    #gallery-center{
        grid-template-columns: repeat(4, 1fr);
    }
}

/*==========Footer========*/
.footer{
    background:#000;
    text-align: center;
}
.footer .text{
text-transform: uppercase;
color: #fff;
font-size: 24px;
margin-top: 20px;
}

              
            
!

JS

              
                
              
            
!
999px

Console