js实现小球内部渐变模糊效果代码
代码语言:html
所属分类:布局界面
代码描述:js实现小球内部渐变模糊效果代码,点击小球可更换渐变模糊效果。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300&display=swap" rel="stylesheet"> <style> body { height: 100vh; margin: 0; display: grid; place-items: center; background: #2f3542; } .marble { width: 50vmin; height: 50vmin; border-radius: 50%; overflow: hidden; position: relative; box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.1), inset 10px 10px 40px rgba(255, 255, 255, 0.2), inset -10px -10px 40px rgba(0, 0, 0, 0.3); } @keyframes (max-width: 991px) { .marble { width: 300px; height: 300px; } } .swirl { width: 50%; height: 50%; border-radius: 50%; position: absolute; cursor: pointer; transition: all 300ms ease; } h1 { position: absolute; top: 30px; color: rgba(255, 255, 255, 0.4); font-family: 300; font-family: "Inter", sans-serif; } </style> </head> <body> <h1> click to randomize </h1> <div class="marble"> <div class="swirl swi.........完整代码请登录后点击上方下载按钮下载查看
网友评论0