如何修复主标头滑入时我的第二标头未出现的问题?

huangapple go评论69阅读模式
英文:

How can I fix the issue with my second header not appearing during slide-in of the main header?

问题

我有一个测试的HTML文件,其中包含2个标题。第一个标题在我滚动超过一定像素数量时应该滑出页面,而实际上确实会滑出,但与此同时,第二个标题也应该出现在主标题下面,并与主标题同时滑动。第二个标题应该停在我的主标题原来的位置。但不幸的是,它甚至都没有出现。我的JavaScript文件也没有使它滑动。

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<div id="headerContainer">
  <header id="myHeader">
    <div class="main">
      <div class="content">
        <div class="logo">
          <h2>Amin</h2>
        </div>
        <nav>
          <div class="nav-item"> About <div class="submenu">
              <a href="#">Culture</a>
              <a href="#">Community</a>
              <a href="#">Milestones</a>
            </div>
          </div>
          <div class="nav-item"> Story <div class="submenu">
              <a href="#">Archives</a>
              <a href="#">History</a>
            </div>
          </div>
          <div class="nav-item">
            <a href="#">News</a>
          </div>
          <div class="nav-item"> Tech & Service <div class="submenu">
              <a href="#">Tech</a>
              <a href="#">Service</a>
            </div>
          </div>
          <div class="nav-item"> Responsibility <div class="submenu">
              <a href="#">Promise</a>
              <a href="#">ESG</a>
              <a href="#">Social Impact</a>
              <a href="#">Digital rights</a>
              <a href="#">AI Ethics</a>
            </div>
          </div>
        </nav>
        <div class="buttons">
          <button class="btn">
            <div class="icon"></div>
          </button>
          <button class="btn">
            <div class="icon"></div>
          </button>
          <button class="btn">
            <div class="icon"></div>
          </button>
          <!-- 重复上面的行以添加其他按钮 -->
        </div>
      </div>
    </div>
  </header>
  <header id="newHeader">
    <div class="main">
      <div class="content">
        <div class="logo"> <h2>Amin's Workspace</h2> </div>
      </div>
    </div>
  </header>
</div>
<h1 style="margin-top: 3000px">test</h1>
* {
  box-sizing: border-box;
}

.sticky {
  position: fixed;
  top: 0;
  z-index: 100;
}

#headerContainer {
  position: sticky;
  top: 0;
  z-index: 100;
}

#myHeader,
#newHeader {
  position: sticky;
  top: 0;
  transition: transform 0.3s ease-in-out;
}

#headerPlaceholder {
  height: 73px; /* This should be the same height as your header */
  visibility: hidden; /* This ensures the div is invisible when not in use */
}

#myHeader.scrolled {
  border-bottom: solid 1px lightgrey;
}

#myHeader {
  position: fixed;
  top: 0px;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 73px;
  padding: 0 20px;
  border-bottom: solid 1px transparent;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
  transition: transform 0.3s ease-in-out, border-color 0.3s;
}

#myHeader.slide-out {
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  border-color: transparent;
}

#newHeader {
  position: fixed;
  top: 73px;
  left: 0;
  display: none;
  justify-content: space-between;
  align-items: center;
  height: 73px;
  padding: 0 20px;
  border-bottom: solid 1px transparent;
  width: 100%;
  box-sizing: border-box;
  z-index: 99;
  opacity: 0;
  transition: top 0.3s ease-in-out, opacity 0.3s, border-color 0.3s;
  transform: translateY(-100%);
}

#newHeader.slide-in {
  top: 0;
  opacity: 1;
  border-color: lightgrey;
}

.visible {
  display: block;
}

.hidden {
  display: none;
}

.main {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px; /* adjust as needed */
  width: 100%;
}

@keyframes slideIn {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0);
  }
}

.border-bottom {
  border-bottom: 1px solid grey;
}

.logo {
  font-family: 'Open Sans', sans-serif;
  user-select: none;
}

nav {
  display: flex;
}

.nav-item {
  position: relative;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  margin-right: 10px;
  display: inline-block;
  padding: 0 28px;
  cursor: pointer;
}

.nav-item a {
  color: black;
  text-decoration: none;
}

.submenu {
  display: none;
  position: absolute;
  top: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  background-color: black;
  padding: 10px;
  border-radius: 24px;
  white-space: nowrap;
}

.submenu.active {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: max-content;
}

.submenu a {
  display: block;
  padding: 5px 10px;
  color: white;
  font-weight: normal;
  transition: color 0.1s;
}

.submenu a:hover {
  font-weight: bold;
}

.button {
  display: flex;
  justify-content: space-between;
  width: calc(36px * 3 + 18px * 2);
}

.btn {
  width: 36px;
  height: 36px;
  background-color: green;
  margin-right: 10px;
}

.icon {
  width: 24px;
  height: 24px;
  background-color: white;
}
英文:

I have a test html file with 2 headers. The first header is supposed to slide-out out of the page when I scroll past a certain amount of pixels and it does, but at that same time the second header is supposed to appear under the main header and slide at the same time as the main header. The second one is supposed to stop at the old place of my main header. But unfortunately is doesn't even appear. Nor does my js file make it slide.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

window.addEventListener(&quot;DOMContentLoaded&quot;, function() {
var mainHeader = document.getElementById(&quot;myHeader&quot;);
// Add the scroll event listener
window.addEventListener(&quot;scroll&quot;, function() {
var oldHeader = document.getElementById(&#39;myHeader&#39;);
var newHeader = document.getElementById(&#39;newHeader&#39;);
if (window.pageYOffset &gt; 0) {
oldHeader.style.borderBottom = &quot;1px solid lightgrey&quot;; 
} else {
oldHeader.style.borderBottom = &quot;none&quot;;
}
if (window.pageYOffset &gt;= 100) {
oldHeader.style.transform = &quot;translateY(-100%)&quot;;
newHeader.style.transform = &quot;translateY(0%)&quot;;
} else {
oldHeader.style.transform = &quot;translateY(0%)&quot;;
newHeader.style.transform = &quot;translateY(-100%)&quot;;
}
});
var navItems = document.querySelectorAll(&quot;.nav-item&quot;);
navItems.forEach(function(navItem, index) {
var submenu = navItem.querySelector(&quot;.submenu&quot;);
var submenuItems = submenu ? submenu.querySelectorAll(&quot;a&quot;) : [];
var link = navItem.querySelector(&quot;a&quot;);
if (
link &amp;&amp;
index !== 2 &amp;&amp;
submenuItems.length === 0
) {
link.addEventListener(&quot;click&quot;, function(e) {
e.stopPropagation();
window.location.href = link.getAttribute(&quot;href&quot;);
});
}
navItem.addEventListener(&quot;click&quot;, function(e) {
var isActive = submenu &amp;&amp; submenu.classList.contains(&quot;active&quot;);
closeAllSubmenus();
if (!isActive &amp;&amp; index !== 2) {
submenu &amp;&amp; submenu.classList.add(&quot;active&quot;);
}
e.stopPropagation();
});
navItem.addEventListener(&quot;mouseover&quot;, function() {
navItems.forEach(function(item) {
if (item !== navItem) {
item.querySelector(&quot;a&quot;).classList.add(&quot;hovered&quot;);
}
});
});
navItem.addEventListener(&quot;mouseout&quot;, function() {
navItems.forEach(function(item) {
if (item !== navItem) {
item.querySelector(&quot;a&quot;).classList.remove(&quot;hovered&quot;);
}
});
});
submenuItems.forEach(function(item) {
item.addEventListener(&quot;mouseover&quot;, function() {
submenuItems.forEach(function(submenuItem) {
if (submenuItem !== item) {
submenuItem.classList.add(&quot;hovered&quot;);
}
});
});
item.addEventListener(&quot;mouseout&quot;, function() {
submenuItems.forEach(function(submenuItem) {
if (submenuItem !== item) {
submenuItem.classList.remove(&quot;hovered&quot;);
}
});
});
});
});
function closeAllSubmenus() {
var submenus = document.querySelectorAll(&quot;.submenu&quot;);
submenus.forEach(function(submenu) {
submenu.classList.remove(&quot;active&quot;);
});
}
});

<!-- language: lang-css -->

* {
box-sizing: border-box;
}
.sticky {
position: fixed;
top: 0;
z-index: 100;
}
#headerContainer {
position: sticky;
top: 0;
z-index: 100;
}
#myHeader,
#newHeader {
position: sticky;
top: 0;
transition: transform 0.3s ease-in-out;
}
#headerPlaceholder {
height: 73px; /* This should be the same height as your header */
visibility: hidden; /* This ensures the div is invisible when not in use */
}
#myHeader.scrolled {
border-bottom: solid 1px lightgrey;
}
#myHeader {
position: fixed;
top: 0px;
left: 0;
display: flex;
justify-content: space-between;
align-items: center;
height: 73px;
padding: 0 20px;
border-bottom: solid 1px transparent;
width: 100%;
box-sizing: border-box;
z-index: 100;
transition: transform 0.3s ease-in-out, border-color 0.3s;
}
#myHeader.slide-out {
transform: translateY(-100%);
transition: transform 0.3s ease-in-out;
border-color: transparent;
}
#newHeader {
position: fixed;
top: 73px;
left: 0;
display: none;
justify-content: space-between;
align-items: center;
height: 73px;
padding: 0 20px;
border-bottom: solid 1px transparent;
width: 100%;
box-sizing: border-box;
z-index: 99;
opacity: 0;
transition: top 0.3s ease-in-out, opacity 0.3s, border-color 0.3s;
transform: translateY(-100%);
}
#newHeader.slide-in {
top: 0;
opacity: 1;
border-color: lightgrey;
}
.visible {
display: block;
}
.hidden {
display: none;
}
.main {
display: flex;
justify-content: center;
width: 100%;
height: 100%;
}
.content {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1300px; /* adjust as needed */
width: 100%;
}
@keyframes slideIn {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
.border-bottom {
border-bottom: 1px solid grey;
}
.logo {
font-family: &#39;Open Sans&#39;, sans-serif;
user-select: none;
}
nav {
display: flex;
}
.nav-item {
position: relative;
font-family: &#39;Open Sans&#39;, sans-serif;
font-size: 16px;
margin-right: 10px;
display: inline-block;
padding: 0 28px;
cursor: pointer;
}
.nav-item a {
color: black;
text-decoration: none;
}
.submenu {
display: none;
position: absolute;
top: calc(100% + 15px);
left: 50%;
transform: translateX(-50%);
background-color: black;
padding: 10px;
border-radius: 24px;
white-space: nowrap;
}
.submenu.active {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: max-content;
}
.submenu a {
display: block;
padding: 5px 10px;
color: white;
font-weight: normal;
transition: color 0.1s;
}
.submenu a:hover {
font-weight: bold;
}
.button {
display: flex;
justify-content: space-between;
width: calc(36px * 3 + 18px * 2);
}
.btn {
width: 36px;
height: 36px;
background-color: green;
margin-right: 10px;
}
.icon {
width: 24px;
height: 24px;
background-color: white;
}

<!-- language: lang-html -->

    &lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.googleapis.com&quot;&gt;
&lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.gstatic.com&quot; crossorigin&gt;
&lt;link href=&quot;https://fonts.googleapis.com/css2?family=Open+Sans:wght@500&amp;family=Poppins&amp;family=Roboto:wght@300;400&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt;
&lt;div id=&quot;headerContainer&quot;&gt;
&lt;header id=&quot;myHeader&quot;&gt;
&lt;div class=&quot;main&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;div class=&quot;logo&quot;&gt;
&lt;h2&gt;Amin&lt;/h2&gt;
&lt;/div&gt;
&lt;nav&gt;
&lt;div class=&quot;nav-item&quot;&gt; About &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Culture&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Community&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Milestones&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt; Story &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Archives&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;History&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt;
&lt;a href=&quot;#&quot;&gt;News&lt;/a&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt; Tech &amp; Service &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Tech&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Service&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt; Responsibility &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Promise&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;ESG&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Social Impact&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Digital rights&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;AI Ethics&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/nav&gt;
&lt;div class=&quot;buttons&quot;&gt;
&lt;button class=&quot;btn&quot;&gt;
&lt;div class=&quot;icon&quot;&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;button class=&quot;btn&quot;&gt;
&lt;div class=&quot;icon&quot;&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;button class=&quot;btn&quot;&gt;
&lt;div class=&quot;icon&quot;&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;!-- Repeat above line for other buttons --&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/header&gt;
&lt;header id=&quot;newHeader&quot;&gt;
&lt;div class=&quot;main&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;div class=&quot;logo&quot;&gt; &lt;h2&gt;Amin&#39;s Workspace&lt;/h2&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/header&gt;
&lt;/div&gt;
&lt;h1 style=&quot;margin-top: 3000px&quot;&gt;test&lt;/h1&gt;

<!-- end snippet -->

答案1

得分: 0

以下是您要翻译的内容:

  1. "There were multiple issues why it didn't work. For example the new header was hidden with display: none and not being shown. It's not possible to animate an element that isn't being rendered."

  2. "I suggest you use classes to add and remove styles. This will keep your JS simple and give all the styling controls to CSS, which is better in doing that stuff."

  3. "In any case, if you run into this kind of issue again, the best course of action is to remove the styles and re-add them one by one to see what effect they're having."

  4. 代码部分不需要翻译。

英文:

There were multiple issues why it didn't work. For example the new header was hidden with display: none and not being shown. It's not possible to animate an element that isn't being rendered.

I suggest you use classes to add and remove styles. This will keep your JS simple and give all the styling controls to CSS, which is better in doing that stuff.

In any case, if you run into this kind of issue again, the best course of action is to remove the styles and re-add them one by one to see what effect they're having. This will help you find any contradicting styles declarations.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

window.addEventListener(&quot;DOMContentLoaded&quot;, function() {
const headerContainer = document.getElementById(&quot;headerContainer&quot;);
var oldHeader = document.getElementById(&#39;myHeader&#39;);
var newHeader = document.getElementById(&#39;newHeader&#39;);
// Add the scroll event listener
window.addEventListener(&quot;scroll&quot;, function() {
headerContainer.classList.toggle(&#39;scrolled&#39;, window.pageYOffset &gt; 0);
if (window.pageYOffset &gt;= 100) {
oldHeader.classList.remove(&#39;active&#39;);
newHeader.classList.add(&#39;active&#39;);
} else {
oldHeader.classList.add(&#39;active&#39;);
newHeader.classList.remove(&#39;active&#39;);
}
});
var navItems = document.querySelectorAll(&quot;.nav-item&quot;);
navItems.forEach(function(navItem, index) {
var submenu = navItem.querySelector(&quot;.submenu&quot;);
var submenuItems = submenu ? submenu.querySelectorAll(&quot;a&quot;) : [];
var link = navItem.querySelector(&quot;a&quot;);
if (
link &amp;&amp;
index !== 2 &amp;&amp;
submenuItems.length === 0
) {
link.addEventListener(&quot;click&quot;, function(e) {
e.stopPropagation();
window.location.href = link.getAttribute(&quot;href&quot;);
});
}
navItem.addEventListener(&quot;click&quot;, function(e) {
var isActive = submenu &amp;&amp; submenu.classList.contains(&quot;active&quot;);
closeAllSubmenus();
if (!isActive &amp;&amp; index !== 2) {
submenu &amp;&amp; submenu.classList.add(&quot;active&quot;);
}
e.stopPropagation();
});
navItem.addEventListener(&quot;mouseover&quot;, function() {
navItems.forEach(function(item) {
if (item !== navItem) {
item.querySelector(&quot;a&quot;).classList.add(&quot;hovered&quot;);
}
});
});
navItem.addEventListener(&quot;mouseout&quot;, function() {
navItems.forEach(function(item) {
if (item !== navItem) {
item.querySelector(&quot;a&quot;).classList.remove(&quot;hovered&quot;);
}
});
});
submenuItems.forEach(function(item) {
item.addEventListener(&quot;mouseover&quot;, function() {
submenuItems.forEach(function(submenuItem) {
if (submenuItem !== item) {
submenuItem.classList.add(&quot;hovered&quot;);
}
});
});
item.addEventListener(&quot;mouseout&quot;, function() {
submenuItems.forEach(function(submenuItem) {
if (submenuItem !== item) {
submenuItem.classList.remove(&quot;hovered&quot;);
}
});
});
});
});
function closeAllSubmenus() {
var submenus = document.querySelectorAll(&quot;.submenu&quot;);
submenus.forEach(function(submenu) {
submenu.classList.remove(&quot;active&quot;);
});
}
});

<!-- language: lang-css -->

* {
box-sizing: border-box;
}
#headerContainer {
display: grid;
position: sticky;
top: 0;
height: 73px;
width: 100%;
border-bottom: solid 1px transparent;
transition: border-color 150ms ease-in-out;
z-index: 100;
}
#headerContainer.scrolled {
border-color: lightgrey;
}
#myHeader,
#newHeader {
grid-area: 1 / 1;
opacity: 0;
height: 73px;
transform: translateY(-100%);
transition: transform 0.3s ease-in-out;;
}
#myHeader {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
width: 100%;
box-sizing: border-box;
}
#newHeader {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
width: 100%;
box-sizing: border-box;
}
#myHeader.active,
#newHeader.active {
transform: translate(0%);
opacity: 1;
border-color: lightgrey;
}
.visible {
display: block;
}
.hidden {
display: none;
}
.main {
display: flex;
justify-content: center;
width: 100%;
height: 100%;
}
.content {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1300px; /* adjust as needed */
width: 100%;
}
.border-bottom {
border-bottom: 1px solid grey;
}
.logo {
font-family: &#39;Open Sans&#39;, sans-serif;
user-select: none;
}
nav {
display: flex;
}
.nav-item {
position: relative;
font-family: &#39;Open Sans&#39;, sans-serif;
font-size: 16px;
margin-right: 10px;
display: inline-block;
padding: 0 28px;
cursor: pointer;
}
.nav-item a {
color: black;
text-decoration: none;
}
.submenu {
display: none;
position: absolute;
top: calc(100% + 15px);
left: 50%;
transform: translateX(-50%);
background-color: black;
padding: 10px;
border-radius: 24px;
white-space: nowrap;
}
.submenu.active {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: max-content;
}
.submenu a {
display: block;
padding: 5px 10px;
color: white;
font-weight: normal;
transition: color 0.1s;
}
.submenu a:hover {
font-weight: bold;
}
.button {
display: flex;
justify-content: space-between;
width: calc(36px * 3 + 18px * 2);
}
.btn {
width: 36px;
height: 36px;
background-color: green;
margin-right: 10px;
}
.icon {
width: 24px;
height: 24px;
background-color: white;
}

<!-- language: lang-html -->

&lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.googleapis.com&quot;&gt;
&lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.gstatic.com&quot; crossorigin&gt;
&lt;link href=&quot;https://fonts.googleapis.com/css2?family=Open+Sans:wght@500&amp;family=Poppins&amp;family=Roboto:wght@300;400&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt;
&lt;div id=&quot;headerContainer&quot;&gt;
&lt;header id=&quot;myHeader&quot; class=&quot;active&quot;&gt;
&lt;div class=&quot;main&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;div class=&quot;logo&quot;&gt;
&lt;h2&gt;Amin&lt;/h2&gt;
&lt;/div&gt;
&lt;nav&gt;
&lt;div class=&quot;nav-item&quot;&gt; About &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Culture&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Community&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Milestones&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt; Story &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Archives&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;History&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt;
&lt;a href=&quot;#&quot;&gt;News&lt;/a&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt; Tech &amp; Service &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Tech&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Service&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nav-item&quot;&gt; Responsibility &lt;div class=&quot;submenu&quot;&gt;
&lt;a href=&quot;#&quot;&gt;Promise&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;ESG&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Social Impact&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Digital rights&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;AI Ethics&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/nav&gt;
&lt;div class=&quot;buttons&quot;&gt;
&lt;button class=&quot;btn&quot;&gt;
&lt;div class=&quot;icon&quot;&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;button class=&quot;btn&quot;&gt;
&lt;div class=&quot;icon&quot;&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;button class=&quot;btn&quot;&gt;
&lt;div class=&quot;icon&quot;&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;!-- Repeat above line for other buttons --&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/header&gt;
&lt;header id=&quot;newHeader&quot;&gt;
&lt;div class=&quot;main&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;div class=&quot;logo&quot;&gt; &lt;h2&gt;Amin&#39;s Workspace&lt;/h2&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/header&gt;
&lt;/div&gt;
&lt;h1 style=&quot;margin-top: 3000px&quot;&gt;test&lt;/h1&gt;

<!-- end snippet -->

huangapple
  • 本文由 发表于 2023年5月29日 04:22:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76353459.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定