I'd like to make a slide of content with HTML and CSS , the slide the header. I'll explain better ...
Normally the menu is used to navigate the pages, so when clicking this link the current page is redirected to another, but what I want is to have buttons on the main page and clicking on them instead of redirecting the user to another page , simply scrolls the contents of the current page and displays the contents of the other page. In other words it would be like an image slide, but with all page content except the header.
I got a result similar to what I want using the following code:
.div {
display: none;
width: 0%;
height: 200px;
background-color: green;
}
.div:target {
display: block;
width: 100%;
}
<a href="#conteudo1">Conteúdo 1</a>
<a href="#conteudo2">Conteúdo 2</a>
<div id="conteudo1" class="conteudo">Conteudo da primeira div</div>
<div id="conteudo2" class="conteudo">Conteudo da segunda div</div>
But this way I was not able to make the slide-like transition, pushing the current content to the left.
I wonder if I can use this code that way, or have some other better way to do this.