I have two arrows that get longer when you hover on them. I want the upper arrow to resize upwards when I hover it instead of downwards. Can you solve this issue just with plain CSS or do you need to use javascript? Or is there a completely new way you could resolve this issue?
Here is my code:
Project.js
<div className='root'>
<div className='project'>
<div className='arrow'>
<div className='arrow-up'>
<div className='up'></div>
<div className='mid'></div>
</div>
<div className='arrow-down'>
<div className='midd'></div>
<div className='down'></div>
</div>
</div>
</div>
</div>
Project.css
.root{
padding-top: 30px;
height: 105vh;
position: relative;
background-color: #101010;
}
.arrow{
position: absolute;
top: 45%;
padding-left: 80px;
}
.arrow-up:hover .mid{
height: 110px;
}
.arrow-up{
width: 30px;
}
.up {
width: 0px;
height: 0px;
border-bottom: 10px solid white;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: none;
}
.mid {
margin-left:7px;
width: 2px;
height: 90px;
background-color:white;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
-o-transition: 0.2s;
transition: 0.2s;
}
.arrow-down:hover .midd{
height: 110px;
}
.arrow-down{
width: 30px;
}
.midd {
margin-top: 12px;
margin-left:7px;
width: 2px;
height: 90px;
background-color:white;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
-o-transition: 0.2s;
transition: 0.2s;
}
.down{
width: 0px;
height: 0px;
border-top: 10px solid white;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: none;
}