js+css实现登录注册tab选项卡表单切换代码
代码语言:html
所属分类:表单美化
代码描述:js+css实现登录注册tab选项卡表单切换代码
代码标签: js css 登录 注册 tab 选项卡 表单 切换 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 10px;
}
body {
min-height: 100vh;
display: grid;
place-content: center;
text-rendering: optimizeSpeed;
padding: 2em;
background: linear-gradient(
90deg,
hsla(328, 75%, 45%, 1) 0%,
hsla(269, 85%, 41%, 1) 100%
);
line-height: 1.4;
font-family: 'Work Sans', sans-serif;
}
input,
label,
small,
button {
display: block;
}
.wrapper {
width: 350px;
height: auto;
margin: auto;
position: relative;
}
.tabs {
width: 100%;
height: 7rem;
display: flex;
justify-content: center;
position: absolute;
top: -45px;
left: 0;
z-index: 0;
}
.navTab {
display: flex;
justify-content: center;
padding: 1em 0;
width: 50%;
border: 0;
outline: 0;
font-size: 1.6rem;
font-weight: 500;
background: linear-gradient(
90deg,
hsla(328, 75%, 45%, 1) 0%,
hsla(269, 85%, 41%, 1) 100%
);
color: hsl(0, 0%, 100%);
border-radius: 30px 30px 0 0;
cursor: pointer;
}
.navTab.active {
background: #ffffff;
color: hsl(0, 0%, 10%);
}
.contentWrapper {
width: 100%;
position: relative.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0