This is the code that runs https://bandolier.learnjsthehardway.com/ for you to review. It uses the https://git.learnjsthehardway.com/learn-javascript-the-hard-way/bandolier-template to create the documentation for the project.
https://bandolier.learnjsthehardway.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
767 B
40 lines
767 B
2 years ago
|
<script>
|
||
|
let first_top = true;
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
display {
|
||
|
width: 100%;
|
||
|
border: 1px solid var(--value0);
|
||
|
display: flex;
|
||
|
flex-direction: row;
|
||
|
}
|
||
|
|
||
|
first {
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
background-color: var(--red);
|
||
|
color: var(--value8);
|
||
|
}
|
||
|
|
||
|
second {
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
background-color: var(--yellow);
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<display class="stacked" style="--aspect-ratio: 10/3;">
|
||
|
<first class="layer" class:top={ first_top }>
|
||
|
<h1>I Am On Top</h1>
|
||
|
</first>
|
||
|
<second class="layer" class:top={ !first_top }>
|
||
|
<h1>I Am On Bottom</h1>
|
||
|
</second>
|
||
|
</display>
|
||
|
<br/>
|
||
|
|
||
|
<button on:click={() => first_top = !first_top}>Swap Layers</button>
|