From 04c0d892816d2fef723130fd0c9d122a78a0498a Mon Sep 17 00:00:00 2001 From: Xingan Zhao <2081098605@qq.com> Date: Fri, 27 Sep 2024 18:08:10 +0800 Subject: [PATCH] header bar trial --- src/containers/App/App.css | 9 ++++++++- src/contents/safety.tsx | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/containers/App/App.css b/src/containers/App/App.css index 09b7cd1..1340f2b 100644 --- a/src/containers/App/App.css +++ b/src/containers/App/App.css @@ -326,7 +326,7 @@ footer a:hover { background-position: center; /* å±…ä¸å¯¹é½èƒŒæ™¯å›¾ç‰‡ */ background-repeat: no-repeat; /* 防æ¢èƒŒæ™¯å›¾ç‰‡é‡å¤ */ background-attachment: fixed; /* 固定背景图片,使其在滚动时ä¸ç§»åŠ¨ */ - + position: relative; } .custom-header-software { width: 100vw; @@ -349,6 +349,13 @@ footer a:hover { } +.header-bar { + position:absolute; + width: 100vw; + height: 100vh; + margin-bottom: 0px; +} + .promotion-video { width: 100%; height: 50vh; /* 设置高度为视å£é«˜åº¦çš„80% */ diff --git a/src/contents/safety.tsx b/src/contents/safety.tsx index d93a22e..c9dd00d 100644 --- a/src/contents/safety.tsx +++ b/src/contents/safety.tsx @@ -46,13 +46,22 @@ export function Safety() { return ( <> <div className="custom-header-safety"> -<h1 className="centered-title"> + <img - src="https://static.igem.wiki/teams/5378/header/safety.png" + src="https://static.igem.wiki/teams/5378/header/header.png" alt="safety header" - className="header-img" + className="header-bar" /> + +<h1 className="centered-title"> + + <img + src="https://static.igem.wiki/teams/5378/header/safety.png" + alt="safety header" + className="header-img" + /> </h1> + </div> <div className="row bg-rice_yellow"> <div className="col-3"> -- GitLab