2021-08-17 10:42:48 -04:00
|
|
|
<style>
|
2021-09-01 14:19:29 -04:00
|
|
|
|
2021-09-01 11:59:49 -04:00
|
|
|
.window
|
|
|
|
{
|
|
|
|
position:relative;
|
|
|
|
width:500px;
|
|
|
|
padding:20px;
|
|
|
|
border-bottom: none;
|
|
|
|
box-sizing:border-box;
|
|
|
|
}
|
2021-09-01 14:19:29 -04:00
|
|
|
|
|
|
|
|
2021-09-01 11:59:49 -04:00
|
|
|
.bar
|
|
|
|
{
|
|
|
|
position:relative;
|
|
|
|
bottom:0;
|
|
|
|
left:0;
|
|
|
|
width:100%;
|
2021-09-01 14:19:29 -04:00
|
|
|
height:44px;
|
2021-09-01 11:59:49 -04:00
|
|
|
overflow:hidden;
|
|
|
|
}
|
|
|
|
.bar span
|
|
|
|
{
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2021-09-01 14:19:29 -04:00
|
|
|
top: -10.5px;
|
2021-09-01 11:59:49 -04:00
|
|
|
left: 50%;
|
|
|
|
width: 20px;
|
2021-09-01 14:19:29 -04:00
|
|
|
height: 20px;
|
2021-09-01 11:59:49 -04:00
|
|
|
border: 5px solid #000;
|
2021-09-01 14:19:29 -04:00
|
|
|
border-right-color: transparent;
|
|
|
|
border-bottom-color: transparent;
|
2021-09-01 11:59:49 -04:00
|
|
|
transform: translate(-50%, 20px) rotate(45deg);
|
2021-09-01 14:19:29 -04:00
|
|
|
transition: left 0.4s;
|
2021-09-01 11:59:49 -04:00
|
|
|
}
|
2021-09-01 14:19:29 -04:00
|
|
|
.bar span::before, .bar span::after
|
2021-09-01 11:59:49 -04:00
|
|
|
{
|
2021-09-01 14:19:29 -04:00
|
|
|
content: " ";
|
2021-09-01 11:59:49 -04:00
|
|
|
display: block;
|
2021-09-01 14:19:29 -04:00
|
|
|
position: absolute;
|
|
|
|
width: 1000px;
|
|
|
|
height:0px;
|
|
|
|
border-top: 5px solid black;
|
|
|
|
transform:rotate(-45deg);
|
|
|
|
}
|
|
|
|
.bar span::before
|
|
|
|
{
|
|
|
|
bottom: -0.5px;
|
|
|
|
right: 20px;
|
|
|
|
transform-origin: right bottom;
|
2021-09-01 11:59:49 -04:00
|
|
|
}
|
2021-09-01 14:19:29 -04:00
|
|
|
.bar span::after
|
|
|
|
{
|
|
|
|
top: -4px;
|
|
|
|
left: 17px;
|
|
|
|
transform-origin: left top;
|
|
|
|
}
|
|
|
|
.bar--down
|
|
|
|
{
|
|
|
|
transform: scaleY(-1);
|
|
|
|
}
|
|
|
|
.bar--up
|
|
|
|
{
|
|
|
|
transform: scaleY(1);
|
|
|
|
}
|
|
|
|
.bar--1-3 span
|
|
|
|
{
|
|
|
|
left:16.6%;
|
|
|
|
}
|
|
|
|
.bar--2-3 span
|
2021-09-01 11:59:49 -04:00
|
|
|
{
|
|
|
|
left:50%;
|
|
|
|
}
|
2021-09-01 14:19:29 -04:00
|
|
|
.bar--3-3 span
|
2021-09-01 11:59:49 -04:00
|
|
|
{
|
2021-09-01 14:19:29 -04:00
|
|
|
left:83%;
|
2021-09-01 11:59:49 -04:00
|
|
|
}
|
2021-09-01 14:19:29 -04:00
|
|
|
|
|
|
|
|
2021-09-01 11:59:49 -04:00
|
|
|
button
|
|
|
|
{
|
|
|
|
display:inline-block;
|
2021-09-01 14:19:29 -04:00
|
|
|
padding:5px 0px 5px 0px;
|
2021-09-01 11:59:49 -04:00
|
|
|
box-sizing: border-box;
|
|
|
|
width:33%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="window">
|
|
|
|
<img style="display:block; width:100%; height:auto;" src="https://via.placeholder.com/1024x512.png"/>
|
2021-09-01 14:19:29 -04:00
|
|
|
<button onclick="BarPos(1)">Front</button><button onclick="BarPos(2)">Spine</button><button onclick="BarPos(3)">Back</button>
|
2021-09-01 11:59:49 -04:00
|
|
|
<div class="bar"><span></span></div>
|
2021-09-01 14:19:29 -04:00
|
|
|
<button onclick="BarPos(4)">Intro</button><button onclick="BarPos(5)">1 & 2</button><button onclick="BarPos(6)">3 & 4</button>
|
2021-09-01 11:59:49 -04:00
|
|
|
</div>
|
|
|
|
|
2021-09-01 14:19:29 -04:00
|
|
|
<script>
|
|
|
|
function BarPos(index)
|
|
|
|
{
|
|
|
|
var classX = "bar--" + (((index-1) % 3)+1) + "-3";
|
|
|
|
var classY = index > 3 ? "bar--down" : "bar--up";
|
|
|
|
document.querySelector(".bar").setAttribute("class", "bar " + classX + " " + classY);
|
|
|
|
}
|
|
|
|
</script>
|