Explorar el Código

style: 给顶部导航栏添加粘性定位 (sticky top-0 z-50),适配PC和移动端

nahida hace 1 mes
padre
commit
dda5c909c3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/components/headerBlock.tsx

+ 1 - 1
src/components/headerBlock.tsx

@@ -38,7 +38,7 @@ const Navigation: React.FC = () => {
   }
 
   return (
-    <header className="w-full bg-white shadow-sm border-b border-gray-100">
+    <header className="w-full bg-white shadow-sm border-b border-gray-100 sticky top-0 z-50">
       <div className="max-w-full mx-auto md:px-20 sm:px-6 px-4">
         <div className="flex justify-between items-center h-18">
           {/* Logo 区域 */}