<div class="menu__container"> <div class="menu"> <a href="javascript:;">Home</a> <a href="javascript:;">About</a> <a href="javascript:;">Contact</a> <a href="javascript:;">Faq</a> </div> </div>
.menu__container { max-width: 500px; height: 100px; margin-left: auto; margin-right: auto; margin-top: 50px; margin-bottom: 50px; border-radius: 5px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%); -webkit-transform: perspective(1000px) rotateX(-45deg) rotateY(0deg) rotateZ(0deg); transform: perspective(1000px) rotateX(-45deg) rotateY(0deg) rotateZ(0deg); -webkit-transform-origin: center center 0px; transform-origin: center center 0px; transition: all 0.5s ease-out; } .menu__container:hover { -webkit-transform: perspective(1000px) rotateX(355deg) rotateY(0deg) rotateZ(0deg); transform: perspective(1000px) rotateX(355deg) rotateY(0deg) rotateZ(0deg); box-shadow: 0 10px 40px rgba(0,0,0,0); } .menu__container .menu { display: flex; justify-content: space-around; align-items: center; max-width: 100%; height: 100%; } .menu__container .menu a { text-decoration: none; color: #fff; font-size: 17px; } .menu__container .menu a:hover { -webkit-transform: scale(1.1, 1.1); transform: scale(1.1, 1.1); }