u
This commit is contained in:
1 parent
8e8ab25726
commit
2aa2b513eb
10 files changed
+245
-18
No files matched your search
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Curved TabBar</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
/* TabBar 容器 */
|
||||
.tabbar-container {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* TabBar 背景弧形 */
|
||||
.tabbar-bg {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
background: white;
|
||||
border-top-left-radius: 30px;
|
||||
border-top-right-radius: 30px;
|
||||
box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
/* Tab 按钮 */
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 60px;
|
||||
font-size: 24px;
|
||||
color: #9ca3af;
|
||||
transition: transform 0.2s;
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.tab-item:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
/* 中间凸起按钮 */
|
||||
.tab-item.center {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background: #4f46e5;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
line-height: 70px;
|
||||
margin-top: -20px; /* 嵌入凹槽 */
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
||||
font-size: 28px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="tabbar-container">
|
||||
<div class="tabbar-bg"></div>
|
||||
<div class="tab-item">💰</div>
|
||||
<div class="tab-item">❤️</div>
|
||||
<div class="tab-item center">🗂</div>
|
||||
<div class="tab-item">💬</div>
|
||||
<div class="tab-item">👤</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user