css实现边框线条走动的按钮动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现边框线条走动的按钮动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box } body { height: 100vh; display: flex; justify-content: center; align-items: center; background-color: #040413 } .night { position: relative; width: 300px; height: 100px; color: #12bef3; letter-spacing: 12px; font-size: 50px; line-height: 100px; text-align: center; background-image: linear-gradient(90deg,#283ea1 50%,#1f3185 50%); text-transform: uppercase; user-select: none; text-decoration: none; overflow: hidden; box-shadow: inset 0 0 10px #0e1469,0 0 5px #09d0eb; transition: all .5s } .night:hover { text-shadow: 0 0 5px #12bef3,0 0 8px #12bef3,0 0 10px #12bef3; background-image: linear-gradient(90deg,#192663 50%,#0d163a 50%); box-shadow: inset 0 0 10px #0e1469,0 0 5px #09d0eb,0 0 10px #09d0eb } .night span { position: absolute } .night span:nth-child(1) { top: 0; left: 0; width: 100%; height: 2px; background-image: linear-gradient(to right,transparent,#09f); animation: move1 2s linear infinite } @keyframes move1 { 0% { trans.........完整代码请登录后点击上方下载按钮下载查看
网友评论0