js+css实现6组按钮悬浮点击动画效果代码
代码语言:html
所属分类:布局界面
代码描述:js+css实现6组按钮悬浮点击动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap" rel="stylesheet"> <style> /* GENERAL STYLES */ body { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; height: 100vh; width: 100vw; position: relative; margin: 0; overflow-x: hidden; background-color: #1e1e23; } * { font-size: 16px; font-family: "Poppins", sans-serif; } .cont { width: 100%; height: 50%; display: flex; justify-content: center; align-items: center; position: relative; } .cont:nth-child(2n) { background-color: #0c0c0e; } .cont:nth-child(3) { height: 100vh; width: 100vw; background-color: #2f2f37; } button { height: 50px; width: 150px; border-radius: 5px; border: none; cursor: pointer; } /* GIANT BUTTON */ #giant { background-color: #7e7ece; transition: all ease 0.2s; position: absolute; } #giant:hover { height: 90vh; width: 95vw; font-size: 30px; border-radius: 10px; } /* DISABLED */ #disabled { background-color: white; position: relative; cursor: not-allowed !important; font-size: 16px; } #disabled::before { content: ""; position: absolute; left: 0; top: 15%; width: 0%; height: 5px; background-color: black; box-shadow: 0 15px 0px black, 0 30px 0px black; transition: width 0.2s ease; } #disabled:hover::before { width: .........完整代码请登录后点击上方下载按钮下载查看
网友评论0