css实现圆形线条旋转悬浮渐变动画文字背景效果代码
代码语言:html
所属分类:动画
代码描述:css实现圆形线条旋转悬浮渐变动画文字背景效果代码
代码标签: css 圆形 线条 旋转 悬浮 渐变 动画 文字 背景
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Quicksand', sans-serif; } :root{ --color: linear-gradient(to right, #8360c3, #2ebf91); --color2: linear-gradient(to bottom, #8360c3, #2ebf91); --color3: linear-gradient(to left, #8360c3, #2ebf91); } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #000; } .square { position: relative; width: 400px; height: 400px; display: flex; justify-content: center; align-items: center; } /* Span 1 */ .square span:nth-child(1) { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 2px solid #fff; border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; transition: 0.5s; animation: animate 6s linear infinite; } /* span 1 hover */ .square:hover span:nth-child(1) { background: var(--color); border: none; } /* Span 2 */ .square span:nth-child(2) { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 2px solid #fff; border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; transition: 0.5s; animation: animate 4s linear infinite; } /* span 2 hover */ .square:hover span:nth-child(2) { background: var(--color2); border: none; } /* Span 3 */ .square span:nth-child(3) { position: absolute; top: 0; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0