Upon clicking and dragging the button upwards at the bottom of the screen using a mouse, I expect the lock screen to close and the new page to appear.
The next page that will open directly after this action is "Page to open"
I attempted to achieve this functionality with mouseup and mousedown events but was unsuccessful. Watch the complete example video demonstrating the desired function
Streamable
.container {
position: absolute;
display: flex;
right: 40px;
bottom: 40px;
}
.Phone-container {
position: absolute;
width: 285px;
height: 580px;
border-radius: 30px;
overflow: hidden;
}
.Phone-Background {
background-image: url('https://firebasestorage.googleapis.com/v0/b/fotos-3cba1.appspot.com/o/wallpaper.jpg?alt=media&token=059229cc-3823-4d27-834a-7b62cabd69d2');
background-size: cover;
background-repeat: no-repeat;
right: 0;
bottom: 0;
}
.unlockBar {
position: absolute;
width: 40%;
height: 4px;
border-radius: 20px;
right: 30%;
top: 565px;
background-color: rgba(255, 255, 255, .7);
opacity: 0;
transition: ease all 0.2s;
cursor: grab;
}
.Phone-container:hover .unlockBar {
opacity: 1;
}
.Phone-container .unlockBar:hover:before {
opacity: 1;
transform: none;
}
.Phone-container .unlockBar::before {
content: attr(data-msj);
position: absolute;
bottom: 100%;
left: 0;
right: 0;
max-width: 100px;
margin: 0 auto;
padding-bottom: 10px;
color: #fff;
font-size: 12px;
text-align: center;
opacity: 0;
transform: translateY(0px);
transition: ease all .8s;
}
<div class="container">
<div class="Phone-container Phone-Background">
<div class="unlockBar" data-msj="Swipe Up to Open"></div>
<div class="Page to open">
</div>
</div>
</div>