Code: Select all
const allTabs = document.querySelector(".allTabs");
const btnsAll = document.querySelectorAll(".tab-btn");
const articles = document.querySelectorAll(".tab");
allTabs.addEventListener("click", function(e) {
const id = e.target.dataset.id;
if (id) {
// remove active from other buttons
btnsAll.forEach(function(btn) {
btn.classList.remove("active");
e.target.classList.add("active");
});
// hide other all articles
articles.forEach(function(article) {
article.classList.remove("active");
});
const element = document.getElementById(id);
element.classList.add("active");
}
});< /code>
.tab {
display: none;
}
.tab-btn.active {
border-bottom: 3px solid hsl(0, 94%, 66%);
}
.tab.active {
display: flex;
margin-left: 4.2rem;
margin-right: 4.2rem;
}< /code>
Features
Our aim is to make it quick and easy for you to access your favourite websites.
Your bookmarks sync between your devices so you can access them on the go.
Simple Bookmarking
Speedy Searching
Easy Sharing
[img]./images/illustration-features-tab-1.svg[/img]
Bookmark in one click
Organize your bookmarks however you like. Our simple [url=viewtopic.php?t=13405]drag-and-drop[/url] interface
gives you complete control over how you manage your favourite sites.
More Info
[img]./images/illustration-features-tab-2.svg[/img]
Intelligent search
Our powerful search feature will help you find saved sites in no time at all.
No need to trawl through all of your bookmarks.
More Info
[img]./images/illustration-features-tab-3.svg[/img]
Share your bookmarks
Easily share your bookmarks and collections with others. Create a shareable
link that you can send at the click of a button.
More Info
< /code>
< /div>
< /div>
< /p>
Kann jemand dies beheben? Dieser CSS -Code fügt den aktiven Registerkarten und ihren entsprechenden Artikeln Stile hinzu. Wenn eine Registerkarte klickt, wird die .aktive Klasse sowohl zur Schaltfläche .tab-BTN als auch zum .tab-Artikel hinzugefügt, der die in diesem CSS-Code angegebenen Stile auslöst.border-bottom: 3px solid hsl(0, 94%, 66%);
Code: Select all
margin-left: 4.2rem; margin-right: 4.2rem; display: flex;
Code: Select all
display: block; justify-content: left;
Code: Select all
text-align: left; display: block; margin-top: 6rem; padding-left: 3rem;
Code: Select all
text-align: left; padding-left: 1.4rem;
Code: Select all
display: block; margin-left: 3rem; margin-top: 2rem;