| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- /* 整体容器 */
- .tab-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: 999;
- background: transparent;
- /* 为安全区留空 */
- padding-bottom: env(safe-area-inset-bottom);
- }
- .tab-bar-inner {
- display: flex;
- align-items: stretch;
- background: #fff;
- border-radius: 32rpx 32rpx 0 0;
- box-shadow: 0 -4rpx 24rpx rgba(100, 60, 20, 0.12);
- border-top: 1rpx solid rgba(200, 168, 130, 0.25);
- overflow: hidden;
- }
- /* 每个 Tab 项 */
- .tab-item {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 12rpx 0 18rpx;
- position: relative;
- transition: all 0.2s ease;
- }
- .tab-item:active {
- opacity: 0.75;
- }
- /* 顶部激活条 */
- .tab-indicator {
- position: absolute;
- top: 0;
- left: 50%;
- transform: translateX(-50%) scaleX(0);
- width: 48rpx;
- height: 6rpx;
- border-radius: 0 0 6rpx 6rpx;
- background: linear-gradient(90deg, #8B4513, #D2691E);
- transition: transform 0.25s ease;
- }
- .indicator-show {
- transform: translateX(-50%) scaleX(1);
- }
- /* 图标区域 */
- .tab-icon-wrap {
- width: 80rpx;
- height: 56rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 6rpx;
- position: relative;
- }
- .tab-svg-box {
- position: relative;
- width: 52rpx;
- height: 52rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /* 激活时的圆形背景 */
- .tab-icon-bg {
- position: absolute;
- inset: -8rpx;
- border-radius: 20rpx;
- background: transparent;
- transition: background 0.2s ease;
- }
- .icon-bg-active {
- background: rgba(139, 69, 19, 0.1);
- }
- /* 图标本体 — 用 mask + background 实现着色 SVG */
- .tab-icon-img {
- width: 44rpx;
- height: 44rpx;
- background-color: #b0a090;
- transition: background-color 0.2s ease;
- -webkit-mask-size: contain;
- -webkit-mask-repeat: no-repeat;
- -webkit-mask-position: center;
- mask-size: contain;
- mask-repeat: no-repeat;
- mask-position: center;
- }
- .icon-img-active {
- background-color: #8B4513;
- }
- /* 首页 - 房子图标 */
- .icon-0 {
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
- }
- /* 世系查询 - 树形/关系图标 */
- .icon-1 {
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z'/%3E%3C/svg%3E");
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z'/%3E%3C/svg%3E");
- }
- /* 我的录入 - 编辑图标 */
- .icon-2 {
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
- }
- /* 家族圈 - 人群图标 */
- .icon-3 {
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E");
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E");
- }
- /* 文字标签 */
- .tab-label {
- font-size: 20rpx;
- color: #b0a090;
- transition: color 0.2s ease, font-weight 0.2s ease;
- letter-spacing: 1rpx;
- }
- .tab-label-active {
- color: #8B4513;
- font-weight: 700;
- }
|