Is there a way to dynamically change the color of my fixed side links based on the background color when scrolling? I attempted to use CSS mixed-blend-mode: difference, but it does not provide the level of control I need. Therefore, I am looking to achieve this using jQuery. Any suggestions on how I can accomplish this?
Below is an example of my code:
.right-aside {
position: fixed;
z-index: 10;
right: -10px;
top: 100px;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-pack: justify;
justify-content: space-between;
width: 180px;
padding: 0;
font-size: 16px;
line-height: 21px;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
color: #fff;
text-transform: uppercase;
float:left;
height: fit-content;
}
.right-aside__menu ul {
padding: 0;
margin: 0;
list-style: none;
}
.right-aside__menu ul li a {
display: block;
text-align: center;
transition: all 300ms;
color: #fff;
}
.left-aside {
position: fixed;
z-index: 10;
left: -10px;
top: 100px;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-pack: justify;
justify-content: space-between;
width: fit-content;
padding: 0;
font-size: 16px;
line-height: 21px;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
color: #fff;
text-transform: uppercase;
float:left;
}
.left-aside__menu ul {
padding: 0;
margin: 0;
list-style: none;
}
.left-aside__menu ul li a {
display: flex;
text-align: center;
transition: all 300ms;
color: #fff;
}
.left-aside__menu-item-link .uk-icon {
margin-right: 10px;
min-width: 20px;
}
.wrapper {
height: 100%;
}
.wrapper div {
height: 50vh;
}
.wrapper div:nth-child(2n+1) {
background: green;
}
<div class="wrapper">
<div></div>
<div class="white"></div>
<div></div>
<div class="white"></div>
<div></div>
</div>
<aside class="right-aside">
<nav class="right-aside__menu">
<ul class="right-aside__menu-list">
<li class="right-aside__menu-item ">
<a href="" class="right-aside__menu-item-link" title="phone">
<span class="right-aside__menu-icon">
</span>
<span class="phone-vertical">+7 777 777 77 77</span>
</a>
</li>
</ul>
</nav>
</aside>
<aside class="left-aside">
<nav class="left-aside__menu">
<ul class="left-aside__menu-list">
<li class="left-aside__menu-item ">
<a href="https://www.instagram.com/" class="left-aside__menu-item-link" title="contacts">
<span uk-icon="icon: instagram"></span>
<span class="phone-vertical">instagramaccount</span>
</a>
</li>
</ul>
</nav>
</aside>