css文本对齐按钮点击动画效果代码
代码语言:html
所属分类:布局界面
代码描述:css文本对齐按钮点击动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { display: grid; place-items: center; height: 100vh; background:linear-gradient(170deg, #eaeaea, #d6d6d6); } body #panel { position: relative; font-size: 3rem; display: grid; grid-template-columns: repeat(4, 1em); grid-template-rows: 1em; grid-gap: 0.5em; padding: 0.5em; border-radius: 0.25em; background: white; box-shadow: 0 0.25em 1em 0 #00000020, 0 0.1em 0.2em 0 #00000020; } body #panel input { position: relative; -webkit-appearance: none; -moz-appearance: none; appearance: none; color: #E6E9ED; cursor: pointer; } body #panel input:before, body #panel input:after { content: ""; position: absolute; top: 0em; left: 0em; right: 0em; height: 0.25em; background: currentcolor; border-radius: 1em; transition: 0.25s; } body #panel input:before { box-shadow: 0 0.75em 0 0 currentcolor; } body #panel input:after { top: 50%; transform: translatey(-50%); } body #panel input:hover { color: #D6D8DB; } body #panel input.left:after { right: 0.2em; } body #panel input.center:after { left: 0.1em; right: 0.1em; } body #panel input.right:after { left: 0.2em; } body #panel .floater { pointer-events: none; position: absolute; top: 0.5em; left: 0.5em; right: 0.5em; bottom: 0.5em; color: #5D9CEC; } body #panel .floater > span { display: flex; flex-direction: column; position: absolute; left: 0em; height: 0.25em; transition: 0.25s; width: 1em; } body #panel .floater > span:nth-child(1) { top: 0; } body #panel .floater > span:nth-child(2) { top: 50%; transform: tr.........完整代码请登录后点击上方下载按钮下载查看
网友评论0