css实现带tab选项卡切换的个人信息卡片效果代码
代码语言:html
所属分类:选项卡
代码描述:css实现带tab选项卡切换的个人信息卡片效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap" rel="stylesheet">
<style>
:root {
--primary: #5F5DFE;
--primary-darker: #4F4DFE;
--bg: #EFF3F4;
--white: #FFF;
--profile-bg: #FFFFFD;
--socials-bg: #F9FAFC;
--highlight-bg: #F9FAFC;
--text-bg: #878789;
--text: #797C83;
--border-color: #F4F4F4;
--social-color: #6B6C6E;
--active: #7774B5;
--tab-bg: #EBE9FF;
--tabs-border: #F2F6F5;
--tab-width: 7rem;
--tabs-gap: 0rem;
--tab-radius: 0.4rem;
--scrollbar-thumb: #e4e3f3;
--scrollbar-bg: #F2F6F5;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*:focus {
outline: 1px solid var(--primary);
outline-offset: 0;
}
*::selection {
background: var(--primary);
color: var(--white);
}
*::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
background: var(--scrollbar-bg);
border-radius: 9.99rem;
}
*::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 9.99rem;
}
body {
font-family: 'Manrope', sans-serif;
background: var(--bg);
color: var(--text);
display: flex;
justify-content: center;
flex-direction: column;
height: 100vh;
user-select: none;
}
.profile {
background: var(--profile-bg);
padding: 1rem;
border-radius: 1rem;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 28rem;
min-width: 20rem;
margin: 0 auto;
gap: 0.75rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.profile__highlight__wrapper {
display: flex;
flex-direction: column;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0