css+div实现炫酷水滴泡泡叠加旋转悬浮动画效果代码
代码语言:html
所属分类:动画
代码描述:css+div实现炫酷水滴泡泡叠加旋转悬浮动画效果代码
代码标签: css div 炫酷 水滴 泡泡 叠加 旋转 悬浮 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> *{ margin: 0; padding: 0; box-sizing: border-box; } .container { width: 100%; min-height: 100vh; background-repeat: no-repeat; background-size: cover; background-position: center; background: linear-gradient(178.6deg, rgb(20, 36, 50) 11.8%, rgb(124, 143, 161) 83.8%); } .content{ width: 100%; min-height: 100vh; position: absolute; top:0; left:0; display: flex; flex-direction: column; justify-content: center; align-items: center; } .content h1{ font-size: 45px; color: #fff; font-weight: 400; margin-bottom: 20px; } .content p{ font-size: 16px; color: #fff; } /* === removing default button style ===*/ .button { margin: 0; height: auto; background: transparent; padding: 0; border: none; } /* button styling */ .button { --border-right: 6px; --text-stroke-color: rgba(255,255,255,0.6); --animation-color:rgb(20, 36, 50); --fs-size: 2em; letter-spacing: 3px; text-decoration: none; font-size: var(--fs-size); font-family: "Arial"; position: relative; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1px var(--text-stroke-color); } /* this is the text, when you hover on button */ .hover-text { position: absolute; box-sizing: border-box; content: attr(data-text); color: var(--animation-color); width: 0%; inset: 0; border-right: var(--border-right) solid var(--animation-color); overflow: hidden; transition: 0.5s; -webkit-text-stroke: 1px var(--animation-color); } /* hover */ .button:hover .hover-text { width: 100%; filter: drop-shadow(0 0 23px var(--animation-color)) } /* */ .square { position: relative; margin: 0 10px; width: 400px; height: 400px; display: flex; justify-content: center; align-items: center; } .square .one { position: absolute; width: 100%; height: 100%; border: 2px solid black; border-radius: 32% 58% 69% 43% / 48% 32% 59% 55%; transition: 0.5s; animation: animate 6s linear infinite; } .twitch:hover .one { border: none; background:rgb(20, 36, 50);; } .square .two.........完整代码请登录后点击上方下载按钮下载查看
网友评论0