整体色彩方案以深蓝为主色调,彰显专业与稳重,辅以浅绿作为点缀,传递信任感与活力。为了增强页面的动态性,紫色被巧妙地运用于交互元素,营造出独特的视觉冲击。
/* 主色调与辅助色彩 */
:root {
--primary-color: #0D2538;
--secondary-color: #00C897;
--accent-color: #8A2BE2;
--font-color: #FFFFFF;
}
body {
background-color: var(--primary-color);
color: var(--font-color);
font-family: 'Roboto', sans-serif;
}
.button {
background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
border: none;
padding: 10px 20px;
border-radius: 5px;
transition: background 0.3s ease;
}
.button:hover {
background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
}
基于12栅格系统的响应式布局,确保平台在不同设备上的一致性与灵活性。利用flexbox
与媒体查询,实现模块化展示,适配多种屏幕尺寸。
.container {
display: flex;
flex-wrap: wrap;
margin: 0 -15px;
}
.column {
flex: 0 0 25%;
padding: 15px;
}
@media (max-width: 768px) {
.column {
flex: 0 0 50%;
}
}
@media (max-width: 480px) {
.column {
flex: 0 0 100%;
}
}
各功能区域以卡片形式呈现,通过box-shadow
与border
实现层次分明的视觉效果。阴影的运用赋予模块浮动感,使界面更加立体。
.card {
background-color: #1E2A38;
border: 1px solid #2C3E50;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
padding: 20px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
transform: translateY(-10px);
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}
顶部导航栏采用固定定位,保证主要功能入口随时可达。侧边栏在桌面端提供更多扩展选项,使用position: fixed
与z-index
确保其层级优先。
.navbar {
position: fixed;
top: 0;
width: 100%;
height: 60px;
background-color: var(--primary-color);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30px;
z-index: 1000;
}
.sidebar {
position: fixed;
top: 60px;
left: 0;
width: 250px;
height: 100%;
background-color: #1E2A38;
padding: 20px;
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
transition: transform 0.3s ease;
}
.sidebar.hidden {
transform: translateX(-100%);
}
图标采用线性风格,简洁而现代,与Roboto字体相得益彰,确保文本的易读性与界面的整体一致性。
.icon {
width: 24px;
height: 24px;
fill: var(--font-color);
transition: fill 0.3s ease;
}
.icon:hover {
fill: var(--secondary-color);
}
body {
font-family: 'Roboto', sans-serif;
font-size: 16px;
line-height: 1.6;
}
微动画应用于按钮悬停、数据更新提示及加载过程,通过transition
与animation
增强用户反馈,提升界面的生动感。
.button {
transition: transform 0.2s ease, background 0.3s ease;
}
.button:active {
transform: scale(0.95);
}
@keyframes loading {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loader {
border: 4px solid #f3f3f3;
border-top: 4px solid var(--secondary-color);
border-radius: 50%;
width: 40px;
height: 40px;
animation: loading 1s linear infinite;
}
通过巧妙运用CSS3
技术,数字货币交易平台不仅在视觉上呈现出科技感与专业性,更在交互体验上实现了流畅与高效。从色彩搭配、响应式布局到微动画的细腻设计,每一处细节都彰显出前端技术的深度与精湛。这样的设计不仅满足了信息展示的需求,更提升了用户的操作体验,使平台在激烈的市场竞争中脱颖而出。