移动端的话将导航栏放在标题栏下方,然后是一个x轴可以滚动的导航栏 - Follow Up Deployment
Browse files- index.html +14 -27
index.html
CHANGED
|
@@ -108,7 +108,7 @@
|
|
| 108 |
<span class="bg-pink-600 rounded-full px-3 py-1 text-sm ml-2 animate-pulse">♥ 萌新打卡中 ♥</span>
|
| 109 |
</div>
|
| 110 |
|
| 111 |
-
<div class="
|
| 112 |
<a href="#home" class="hover:text-pink-200 transition flex items-center">
|
| 113 |
<i class="fas fa-home mr-1"></i> 首页
|
| 114 |
</a>
|
|
@@ -127,9 +127,6 @@
|
|
| 127 |
</div>
|
| 128 |
|
| 129 |
<div class="flex items-center space-x-4">
|
| 130 |
-
<button class="md:hidden text-white focus:outline-none">
|
| 131 |
-
<i class="fas fa-bars text-2xl"></i>
|
| 132 |
-
</button>
|
| 133 |
<div class="relative">
|
| 134 |
<button class="flex items-center focus:outline-none">
|
| 135 |
<img src="https://i.pravatar.cc/40?img=5" alt="User" class="w-8 h-8 rounded-full border-2 border-pink-300">
|
|
@@ -141,37 +138,27 @@
|
|
| 141 |
</div>
|
| 142 |
</nav>
|
| 143 |
|
| 144 |
-
<!-- Mobile
|
| 145 |
-
<div class="bg-pink-
|
| 146 |
-
<div class="flex
|
| 147 |
-
<a href="#home" class="
|
| 148 |
-
<i class="fas fa-home mr-
|
| 149 |
</a>
|
| 150 |
-
<a href="#announcement" class="
|
| 151 |
-
<i class="fas fa-bullhorn mr-
|
| 152 |
</a>
|
| 153 |
-
<a href="#chat" class="
|
| 154 |
-
<i class="fas fa-comment-dots mr-
|
| 155 |
</a>
|
| 156 |
-
<a href="#analysis" class="
|
| 157 |
-
<i class="fas fa-search mr-
|
| 158 |
</a>
|
| 159 |
-
<a href="#create" class="bg-pink-
|
| 160 |
-
<i class="fas fa-plus mr-
|
| 161 |
</a>
|
| 162 |
</div>
|
| 163 |
</div>
|
| 164 |
|
| 165 |
-
<script>
|
| 166 |
-
document.addEventListener('DOMContentLoaded', function() {
|
| 167 |
-
const menuButton = document.querySelector('nav button');
|
| 168 |
-
const mobileMenu = document.getElementById('mobileMenu');
|
| 169 |
-
|
| 170 |
-
menuButton.addEventListener('click', function() {
|
| 171 |
-
mobileMenu.classList.toggle('hidden');
|
| 172 |
-
});
|
| 173 |
-
});
|
| 174 |
-
</script>
|
| 175 |
|
| 176 |
<!-- Main Content -->
|
| 177 |
<div class="container mx-auto px-4 py-8">
|
|
|
|
| 108 |
<span class="bg-pink-600 rounded-full px-3 py-1 text-sm ml-2 animate-pulse">♥ 萌新打卡中 ♥</span>
|
| 109 |
</div>
|
| 110 |
|
| 111 |
+
<div class="md:flex items-center space-x-6 hidden">
|
| 112 |
<a href="#home" class="hover:text-pink-200 transition flex items-center">
|
| 113 |
<i class="fas fa-home mr-1"></i> 首页
|
| 114 |
</a>
|
|
|
|
| 127 |
</div>
|
| 128 |
|
| 129 |
<div class="flex items-center space-x-4">
|
|
|
|
|
|
|
|
|
|
| 130 |
<div class="relative">
|
| 131 |
<button class="flex items-center focus:outline-none">
|
| 132 |
<img src="https://i.pravatar.cc/40?img=5" alt="User" class="w-8 h-8 rounded-full border-2 border-pink-300">
|
|
|
|
| 138 |
</div>
|
| 139 |
</nav>
|
| 140 |
|
| 141 |
+
<!-- Mobile Navigation -->
|
| 142 |
+
<div class="md:hidden bg-pink-500 text-white py-3 px-4 overflow-x-auto whitespace-nowrap">
|
| 143 |
+
<div class="inline-flex space-x-6">
|
| 144 |
+
<a href="#home" class="hover:text-pink-200 transition flex items-center">
|
| 145 |
+
<i class="fas fa-home mr-1"></i> 首页
|
| 146 |
</a>
|
| 147 |
+
<a href="#announcement" class="hover:text-pink-200 transition flex items-center">
|
| 148 |
+
<i class="fas fa-bullhorn mr-1"></i> 小喇叭
|
| 149 |
</a>
|
| 150 |
+
<a href="#chat" class="hover:text-pink-200 transition flex items-center">
|
| 151 |
+
<i class="fas fa-comment-dots mr-1"></i> 闲聊区
|
| 152 |
</a>
|
| 153 |
+
<a href="#analysis" class="hover:text-pink-200 transition flex items-center">
|
| 154 |
+
<i class="fas fa-search mr-1"></i> 日常分析
|
| 155 |
</a>
|
| 156 |
+
<a href="#create" class="bg-pink-600 hover:bg-pink-700 px-3 py-1 rounded-full transition flex items-center">
|
| 157 |
+
<i class="fas fa-plus mr-1"></i> 发帖
|
| 158 |
</a>
|
| 159 |
</div>
|
| 160 |
</div>
|
| 161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
|
| 163 |
<!-- Main Content -->
|
| 164 |
<div class="container mx-auto px-4 py-8">
|