js+css实现暗色信息展示选项卡代码
代码语言:html
所属分类:选项卡
代码描述:js+css实现暗色信息展示选项卡代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Nunito:wght@400;600;700&display=swap');
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: #060e1f;
display: flex;
justify-content: center;
align-items: flex-start;
padding: 32px 16px;
min-height: 100vh;
font-family: 'Nunito', sans-serif;
}
.hsr-wrap {
width: 100%;
max-width: 860px;
background: linear-gradient(135deg, #0a1628 0%, #0d2044 50%, #0a1628 100%);
border-radius: 16px;
border: 1.5px solid #1e4a8a;
overflow: hidden;
position: relative;
}
.hsr-wrap::before {
content: '';
position: absolute;
inset: 0;
background:
radial-gradient(ellipse at 30% 20%, rgba(0, 200, 255, 0.06) 0%, transparent 60%),
radial-gradient(ellipse at 70% 80%, rgba(0, 120, 255, 0.04) 0%, transparent 60%);
pointer-events: none;
z-index: 0;
}
.hsr-wrap > * {
position: relative;
z-index: 1;
}
.hsr-header {
display: flex;
align-items: center;
gap: 16px;
padding: 16px 16px 0;
}
.hsr-logo-box {
background: linear-gradient(135deg, #1a3a6e, #0d2044);
border: 1.5px solid #2a5aaa;
border-radius: 10px;
width: 52px;
height: 52px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.hsr-eyebrow {
font-family: 'Rajdhani', sans-serif;
font-size: 11px;
font-weight: 600;
letter-spacing: 3px;
color: #4ab3e0;
text-transform: uppercase;
display: flex;
align-items: center;
gap: 6px;
}
.hsr-eyebrow::after {
content: '▶▶▶';
font-size: 7px;
color: #2a6aaa;
}
.hsr-main-title {
font-family: 'Rajdhani', sans-serif;
font-size: 22px;
font-weight: 700;
color: #e8f4ff;
letter-spacing: 2px;
text-transform: uppercase;
line-height: 1.1;
}
.hsr-body {
display: flex;
padding: 14px 16px 16px;
gap: 12px;
}
.hsr-sidebar {
width: 150px;
flex-shrink: 0;
background: rgba(10, 20, 45, 0.6);
border: 1px solid #1a3a6e;
border-radius: 10px;
padding: 8px;
display: flex;
flex-direction: column;
gap: 4px;
}
.hsr-sidebar-header {
background: linear-gradient(90deg, #0d3060, #0a2048);
border: 1px solid #1e4a8a;
border-radius: 6px;
padding: 6px 8px;
margin-bottom: 4px;
display: flex;
align-items: center;
justify-content: space-between;
}
.hsr-sidebar-header span {
font-size: 9px;
font-weight: 700;
color: #4ab3e0;
letter-spacing: 1.5px;
text-transform: uppercase;
font-family: 'Rajdhani', sans-serif;
}
.hsr-sidebar-arrows {
font-size: 9px;
color: #2a6aaa;
letter-spacing: 1px;
}
.hsr-country {
display: flex;
align-items: center;
gap: 8px;
padding: 7px 10px;
border-radius: 6px;
cursor: pointer;
border: 1px solid transparent;
transition: all 0.16s ease;
font-size: 12px;
font-weight: 600;
color: #7ab0d8;
user-select: none;
}
.hsr-country:hover:not(.active) {
background: rgba(30, 70, 140, 0.35);
border-color: #2a5aaa;
color: #a8d0f0;
transform: translateX(2px);
}
.hsr-country.active {
background: linear-gradient(90deg, rgba(0, 200, 160, 0.18), rgba(0, 150, 120, 0.08));
border-color: #00d4a0;
color: #e8f4ff;
}
.hsr-country.active::before {
content: '▶';
font-size: 8px;
color: #00d4a0;
margin-right: 2px;
margin-left: -4px;
}
.hsr-country-dot {
width: 22px;
height: 22px;
border-radius: 50%;
background: rgba(30, 60, 120, 0.6);
border: 1px solid #2a5aaa;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
flex-shrink: 0;
overflow: hidden;
background-size: cover;
background-position: center top;
}
.hsr-country.active .hsr-country-dot {
border-color: #00d4a0;
background-color: rgba(0, 160.........完整代码请登录后点击上方下载按钮下载查看















网友评论0