css选项卡切换动画效果
代码语言:html
所属分类:表单美化
代码描述:css选项卡切换动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; padding: 0; margin: 0; } body { background-color: #155FFF; display: flex; align-items: center; justify-content: center; height: 100vh; font-family: sans-serif; } .switch-button { background: rgba(255, 255, 255, 0.56); border-radius: 30px; overflow: hidden; width: 240px; text-align: center; font-size: 18px; letter-spacing: 1px; color: #155FFF; position: relative; padding-right: 120px; position: relative; } .switch-button:before { content: "Video"; position: absolute; top: 0; bottom: 0; right: 0; width: 120px; display: flex; align-items: center; justify-content: center; z-index: 3; pointer-events: none; } .switch-button-checkbox { cursor: pointer; position: absolute; top: 0; left: 0; bottom: 0; width: 100%; height: 100%; opacity: 0; z-index: 2; } .switch-button-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0