<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css" rel="stylesheet"> <div class="card"> <!--Card for the button so the button doesn't have to be position absolute and put in a real setting--> <a href="#" class="container"> <div class="action">Buy Now</div> <div class="price">For $9.99</div> </a> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" ></script> @import url("https://fonts.googleapis.com/css?family=Open+Sans"); body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(35deg, #64B6AC, #3C6B7C 100%); } body .card { padding: 40px; border-radius: 4px; background-color: #FFFFFF; } body .card .container { position: relative; display: block; overflow: hidden; width: 170px; height: 50px; margin: 10px 55px; border: 2px solid #64B6AC; border-radius: 4px; color: #3C6B7C; background: transparent; font-family: "Open Sans", sans-serif; text-transform: uppercase; text-decoration: none; text-align: center; letter-spacing: 2px; line-height: 50px; transition: all 0.3s ease; } body .card .container > * { position: absolute; width: 100%; height: 50px; } body .card .container > *.price { bottom: 0; opacity: 0; transition: all 0.3s ease; } body .card .container:hover { width: 280px; height: 70px; margin: 0px 0px; /* .action { top:-2px; } .price { bottom:-2px; }/**/ } body .card .container:hover .price { opacity: 1; transition: all 0.3s ease -0.15s; } body .card .container:active { color: #FFFFFF; background: #64B6AC; transition: all 0.3s ease -0.15s; } Навигация по записям Navbar Dark Ui Swirling hamburger menu toggle