Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-03-25 16:45:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
53619e2acd34bec4a34d9c54c7008bbb0ed39b4a
53619e2a
1 parent
595c171e
style(HomePage): 优化首页标签导航的样式和布局
将标签导航改为粘性定位,增加背景模糊效果,提升用户体验
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
22 deletions
src/views/HomePage.vue
src/views/HomePage.vue
View file @
53619e2
<!--
* @Date: 2025-03-20 19:55:21
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-25 1
5:57:15
* @LastEditTime: 2025-03-25 1
6:44:51
* @FilePath: /mlaj/src/views/HomePage.vue
* @Description: 亲子学院首页组件
*
...
...
@@ -254,28 +254,30 @@
</div>
</div>
<!-- Tab Navigation -->
<div class="px-4 border-b border-gray-200">
<div class="flex space-x-6">
<button
v-for="tab in ['推荐', '直播', '精选']"
:key="tab"
@click="activeTab = tab"
:class="[
'pb-3 px-1 font-medium',
activeTab === tab
? 'text-green-600 border-b-2 border-green-600'
: 'text-gray-500'
]"
>
{{ tab }}
<span
v-if="tab === '直播'"
class="ml-1 px-1.5 py-0.5 bg-red-500 text-white text-xs rounded-full"
<!-- Custom Tab Navigation -->
<div class="sticky top-0 bg-white/70 backdrop-blur-lg" style="z-index: 999;">
<div class="px-4 border-b border-gray-200">
<div class="flex space-x-6">
<button
v-for="tab in ['推荐', '直播', '精选']"
:key="tab"
@click="activeTab = tab"
:class="[
'pb-3 pt-3 px-1 font-medium',
activeTab === tab
? 'text-green-600 border-b-2 border-green-600'
: 'text-gray-500'
]"
>
2
</span>
</button>
{{ tab }}
<span
v-if="tab === '直播'"
class="ml-1 px-1.5 py-0.5 bg-red-500 text-white text-xs rounded-full"
>
2
</span>
</button>
</div>
</div>
</div>
...
...
Please
register
or
login
to post a comment