UNPKG

@bg-dev/nuxt-naiveui

Version:

Unofficial Naive UI module for Nuxt

97 lines (80 loc) 2.34 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> body, html { margin: 0; } body { height: 100vh; height: 100dvh; display: flex; justify-content: center; align-items: center; } </style> <script> const bodyColor = localStorage.getItem('naive-body-bg-color') const primaryColor = localStorage.getItem('naive-primary-color') document.body.style.backgroundColor = bodyColor document.documentElement.style.setProperty('--naive-primary-color', primaryColor); </script> <style> .spinner { margin: 100px auto 0; width: 70px; text-align: center; } .spinner>div { width: 18px; height: 18px; background-color: var(--naive-primary-color); border-radius: 100%; display: inline-block; -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; animation: sk-bouncedelay 1.4s infinite ease-in-out both; } .spinner .bounce1 { -webkit-animation-delay: -0.32s; animation-delay: -0.32s; } .spinner .bounce2 { -webkit-animation-delay: -0.16s; animation-delay: -0.16s; } @-webkit-keyframes sk-bouncedelay { 0%, 80%, 100% { -webkit-transform: scale(0) } 40% { -webkit-transform: scale(1.0) } } @keyframes sk-bouncedelay { 0%, 80%, 100% { -webkit-transform: scale(0); transform: scale(0); } 40% { -webkit-transform: scale(1.0); transform: scale(1.0); } } </style> </head> <body> <div class="spinner"> <div class="bounce1"></div> <div class="bounce2"></div> <div class="bounce3"></div> </div> </body> </html>