Pens

Interactive Back-To-Top Circular Footer

UI Component bởi acmatvjrus
Mở Studio
<div class="btt-footer-wrap">
  <div class="dummy-scroll-space">
    <p>Kéo trang để trải nghiệm hiệu ứng nút cuộn lên đỉnh đầu</p>
  </div>
  <footer class="btt-footer">
    <div class="btt-action-center">
      <button class="circle-btt-btn" id="bttTrigger" aria-label="Cuộn lên đầu trang">
        <svg class="text-ring" viewBox="0 0 100 100" width="100" height="100">
          <path id="circlePath" d="M 50, 50 m -37, 0 a 37,37 0 1,1 74,0 a 37,37 0 1,1 -74,0" fill="none" />
          <text font-size="10.5" font-weight="700" letter-spacing="2" fill="#10a37a">
            <textPath href="#circlePath">
              • BACK TO TOP • SCROLL UP •
            </textPath>
          </text>
        </svg>
        <span class="center-arrow">↑</span>
      </button>
    </div>
    
    <div class="btt-main-row">
      <div class="btt-brand">
        <h3>ORBIT<strong>STUDIO</strong></h3>
        <p>Kiến tạo các sản phẩm kỹ thuật số với tư duy chuyển động và trải nghiệm đột phá.</p>
      </div>
      
      <div class="btt-nav-pills">
        <a href="#" class="nav-pill">Dự Án</a>
        <a href="#" class="nav-pill">Năng Lực</a>
        <a href="#" class="nav-pill">Bảng Giá</a>
        <a href="#" class="nav-pill">Liên Hệ</a>
      </div>
    </div>
    
    <div class="btt-bottom-row">
      <span>© 2026 ORBIT STUDIO. ALL RIGHTS RESERVED.</span>
      <div class="btt-socials">
        <a href="#">TWITTER</a>
        <a href="#">DRIBBBLE</a>
        <a href="#">LINKEDIN</a>
      </div>
    </div>
  </footer>
</div>
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #11141c;
  color: #fff;
}
.btt-footer-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.dummy-scroll-space {
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}
.btt-footer {
  background: #0a0d14;
  border-top: 1px solid #1e2638;
  padding: 0 40px 40px;
  position: relative;
}
.btt-action-center {
  display: flex;
  justify-content: center;
  transform: translateY(-50px);
}
.circle-btt-btn {
  background: #11141c;
  border: 1px solid #10a37a;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 163, 122, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.circle-btt-btn:hover {
  transform: scale(1.1) rotate(45deg);
  box-shadow: 0 15px 35px rgba(16, 163, 122, 0.5);
}
.text-ring {
  animation: spinText 10s linear infinite;
}
@keyframes spinText {
  to { transform: rotate(360deg); }
}
.center-arrow {
  position: absolute;
  font-size: 1.6rem;
  color: #fff;
  font-weight: 700;
  pointer-events: none;
}
.btt-main-row {
  max-width: 1100px;
  margin: 0 auto 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 30px;
  border-bottom: 1px solid #1e2638;
}
.btt-brand h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}
.btt-brand strong { color: #10a37a; }
.btt-brand p {
  margin: 0;
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 380px;
}
.btt-nav-pills {
  display: flex;
  gap: 12px;
}
.nav-pill {
  color: #fff;
  text-decoration: none;
  background: #1e2638;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.nav-pill:hover {
  background: #10a37a;
  transform: translateY(-2px);
}
.btt-bottom-row {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
}
.btt-socials {
  display: flex;
  gap: 20px;
}
.btt-socials a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.btt-socials a:hover { color: #10a37a; }
@media (max-width: 768px) {
  .btt-main-row { flex-direction: column; gap: 20px; align-items: flex-start; }
  .btt-bottom-row { flex-direction: column; gap: 12px; }
}
document.getElementById("bttTrigger")?.addEventListener("click", () => {
  window.scrollTo({ top: 0, behavior: "smooth" });
});
Đã sao chép vào bộ nhớ tạm!