Sliding Info Panel
Home
Snippets
Sliding Info Panel
HTML
CSS
JS
<div class="info-box"> <div class="front">Hover Me</div> <div class="back"> Surprise! Here's a glowing sliding panel.<br> You can put announcements or tips here. </div> </div>
body { height: 100vh; background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); margin: 0; display: flex; justify-content: center; align-items: center; font-family: 'Segoe UI', sans-serif; } .info-box { width: 320px; height: 150px; background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 20px rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,0.1); border-radius: 15px; position: relative; cursor: pointer; transition: transform 0.3s ease; } .info-box .front, .info-box .back { position: absolute; width: 100%; height: 100%; transition: transform 0.6s ease-in-out; } .info-box .front { display: flex; justify-content: center; align-items: center; font-size: 1.5em; font-weight: bold; color: #ffffffcc; text-shadow: 0 0 5px #00ffe0, 0 0 10px #00ffe0; } .info-box .back { background: linear-gradient(135deg, #00c9ff, #92fe9d); color: #000; border-top: 1px solid #fff5; border-radius: 15px; font-size: 1em; display: flex; justify-content: center; align-items: center; text-align: center; transform: translateY(100%); } .info-box{ overflow: hidden; } .info-box:hover .back { transform: translateY(0%); } .info-box:hover .front { transform: translateY(-100%); }
//javascript
Ad #1
Ad #2
Scroll to Top