You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何创建类似Hotstar的底部导航栏(中间带Logo)

实现Hotstar样式的底部导航栏(中央带Logo)

下面是一套可直接复用的代码,实现底部固定导航栏,中央放置突出的Logo,和Hotstar的UI风格一致:

HTML结构

<footer class="hotstar-navbar">
  <div class="nav-item">
    <span class="nav-icon">🏠</span>
    <span class="nav-text">首页</span>
  </div>
  <div class="nav-item">
    <span class="nav-icon">🔍</span>
    <span class="nav-text">搜索</span>
  </div>
  <div class="nav-logo">
    <img src="your-logo-url.png" alt="Hotstar Logo" class="logo-img">
  </div>
  <div class="nav-item">
    <span class="nav-icon">📺</span>
    <span class="nav-text">库</span>
  </div>
  <div class="nav-item">
    <span class="nav-icon">👤</span>
    <span class="nav-text">我的</span>
  </div>
</footer>

CSS样式

/* 全局重置(可选) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 底部导航栏容器 */
.hotstar-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 20px; /* 底部留空间避免内容被遮挡 */
}

/* 普通导航项 */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s;
}

.nav-item:hover {
  color: #1f80e0; /* Hotstar主题蓝 */
}

.nav-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.nav-text {
  font-size: 12px;
}

/* 中央Logo容器 */
.nav-logo {
  position: relative;
  top: -25px; /* 让Logo向上突出导航栏 */
}

.logo-img {
  width: 60px;
  height: 60px;
  border-radius: 50%; /* 圆形Logo,匹配Hotstar风格 */
  border: 3px solid #000; /* 边框和导航栏背景融合 */
}

关键设计要点

  • 固定定位:用position: fixed让导航栏始终停在页面底部
  • Flex布局:快速实现横向均匀分布的导航项
  • Logo突出效果:通过top: -25px让Logo向上偏移,营造悬浮感,圆形边框增强视觉层次
  • 主题配色:使用Hotstar标志性的黑色背景+蓝色高亮,可根据需求替换颜色和图标

内容的提问来源于stack exchange,提问作者Satish V

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 19:48:22