こういうことでしょうか?
html+css+Javascript
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
height: 100vh;
background-color: blue;
margin: 0;
}
div {
width: 100%;
height: 100%;
background-color: orange;
position: absolute;
top: 0;
}
.hide {
display: none;
}
</style>
<title>Document</title>
</head>
<body>
<button>オレンジのページ</button>
<div class="hide target">
<button>ブルーのページ</button>
</div>
<script>
const button = document.getElementsByTagName("button");
const target = document.getElementsByClassName("target")[0];
button[0].addEventListener("click", () => {
target.classList.remove("hide");
});
button[1].addEventListener("click", () => {
target.classList.add("hide");
});
</script>
</body>
</html>