90 lines
No EOL
2 KiB
HTML
90 lines
No EOL
2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Document</title>
|
|
<style>
|
|
/* .tab-content can be styled as you like */
|
|
main {
|
|
max-width: 400px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
p {
|
|
font-family: monospace;
|
|
font-size: 13px;
|
|
}
|
|
|
|
summary {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
background-color: #f3f3f3;
|
|
color: #000;
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
outline: none;
|
|
border-radius: 0.25rem;
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
details[open] summary~* {
|
|
animation: sweep .5s ease-in-out;
|
|
}
|
|
|
|
@keyframes sweep {
|
|
0% {
|
|
opacity: 0;
|
|
margin-top: -10px
|
|
}
|
|
|
|
100% {
|
|
opacity: 1;
|
|
margin-top: 0px
|
|
}
|
|
}
|
|
|
|
details>summary::after {
|
|
position: absolute;
|
|
content: "+";
|
|
right: 20px;
|
|
}
|
|
|
|
details[open]>summary::after {
|
|
position: absolute;
|
|
content: "-";
|
|
right: 20px;
|
|
}
|
|
|
|
details>summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<main>
|
|
<details open>
|
|
<summary>HTML</summary>
|
|
<div class="tab-content">
|
|
<p>your text goes here</p>
|
|
</div>
|
|
</details>
|
|
|
|
<details>
|
|
<summary>CSS</summary>
|
|
<div class="tab-content">
|
|
<p>your text goes here</p>
|
|
</div>
|
|
</details>
|
|
<details>
|
|
<summary>javascript</summary>
|
|
<div class="tab-content">
|
|
<p>your text goes here</p>
|
|
</div>
|
|
</details>
|
|
</main>
|
|
</body>
|
|
</html> |