I am trying to utilize a background blur effect on the tooltip to make it readable on hover. My intuition is telling me that the background has a higher Z value than the tooltip. I have tried a few things to try to resolve the blur effect, but nothing seems to change the outcome. If I modified backdrop-filter to just filter: blur, it looks like the tooltip disappears behind the background.
let btn = document.querySelector("#btn");
let sidebar = document.querySelector(".sidebar");
let searchBtn = document.querySelector(".bx-search");
btn.onclick = function() {
sidebar.classList.toggle("active");
}
searchBtn.onclick = function() {
sidebar.classList.toggle("active");
}
{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Comic sans MS", sans-serif;
}
body {
position: relative;
min-height: 100vh;
width: 100%;
overflow: hidden;
background: url(achtergrond.jpg);
background-size: cover;
background-position: center;
}
.sidebar {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 78px;
padding: 6px 14px;
background: transparent;
backdrop-filter: blur(20px);
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
box-shadow: 0 0 10px rgba(0, 0, 0, 1.1);
transition: all 0.5s ease;
}
.sidebar.active {
width: 240px;
}
.sidebar .logo_content .logo {
color: #fcf4f4;
display: flex;
height: 50px;
width: 100%;
align-items: center;
opacity: 0;
pointer-events: none;
transition: all 0.5s ease;
}
.sidebar.active .logo_content .logo {
opacity: 1;
pointer-events: none;
}
.logo_content .logo i {
font-size: 34px;
margin-right: 5px;
}
.logo_content .logo .logo_name {
font-size: 20px;
font-weight: 400;
}
.sidebar #btn {
position: absolute;
color: #ffffff;
/*kleur lettertype*/
left: 50%;
top: 6px;
font-size: 20px;
height: 50px;
width: 50px;
margin-top: 10px;
text-align: center;
line-height: 50px;
transform: translateX(-50%);
border: 2px solid rgb(255, 255, 255, 0.0);
box-shadow: 0 0 10px rgba(0, 0, 0, 1.0);
border-radius: 12px;
transition: 0.5s ease;
}
.sidebar #btn:hover {
/* border-color:#007bff; */
border-color: #007bff;
color: #1d1b31;
/*kleur lettertype*/
}
.sidebar.active #btn {
left: 90%;
transform: translateX(-75%);
}
.sidebar ul {
margin-top: 55px;
}
.sidebar ul li {
position: relative;
height: 50px;
width: 100%;
margin: 0%;
list-style: none;
line-height: 50px;
margin: 30px 0;
}
.sidebar ul li .tooltip {
position: absolute;
left: 130px;
/* ruimte tussen balk enpositie*/
top: 0%;
transform: translate(-50%, -50%);
border-radius: 6px;
height: 35px;
width: 122px;
background: transparent;
line-height: 35px;
text-align: center;
box-shadow: 0 5px 10px rgba(0, 0, 0, 1.0);
backdrop-filter: blur(20px);
transition: 0s;
opacity: 0;
pointer-events: none;
display: block;
color: #ff0000;
}
.sidebar.active ul li .tooltip {
display: none;
}
.sidebar ul li:hover .tooltip {
transition: all 0.5s ease;
opacity: 1;
top: 50%
}
.sidebar ul li input {
position: absolute;
height: 100%;
width: 100%;
left: 0;
top: 0;
border-radius: 12px;
outline: none;
border: none;
background: transparent;
box-shadow: 0 5px 10px rgba(0, 0, 0, 1.0);
border: 2px solid rgb(255, 255, 255, 0.0);
padding-left: 50px;
font-size: 18px;
color: #fff;
transition: all 0.5s ease
}
.sidebar ul li input::placeholder {
color: #5e5d5d;
}
.sidebar ul li:hover input {
border-color: #007bff;
}
.sidebar ul li .bx-search {
position: absolute;
z-index: 99;
color: rgb(255, 255, 255);
font-size: 22px;
transition: all 0.5s ease
}
.sidebar ul li a {
color: #fff;
display: flex;
align-items: center;
text-decoration: none;
transition: all 0.5s ease;
box-shadow: 0 5px 10px rgba(0, 0, 0, 1.0);
border: 2px solid rgb(255, 255, 255, 0.0);
border-radius: 12px;
white-space: nowrap;
}
.sidebar ul li a:hover {
border-color: #007bff;
}
.sidebar ul li i {
height: 50px;
min-width: 45px;
border-radius: 12px;
line-height: 50px;
text-align: center;
}
.sidebar .links_name {
opacity: 0;
pointer-events: none;
transition: all 0.5s ease;
}
.sidebar.active .links_name {
opacity: 1;
pointer-events: auto;
}
.social_media {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
.social_media #linked {
position: absolute;
left: 50%;
bottom: 5px;
transform: translateX(-50%);
min-width: 50px;
line-height: 50px;
font-size: 20px;
border-radius: 12px;
color: white;
text-align: center;
opacity: 0;
background: transparent;
transition: all 0.3s ease;
box-shadow: 0 5px 10px rgba(0, 0, 0, 1.0);
border: 2px solid rgb(255, 255, 255, 0.0);
}
.sidebar.active .social_media #linked {
left: 13.6%;
opacity: 1;
}
/* linked in effect */
.social_media #linked:hover {
border-color: #007bff;
}
.social_media #log_out {
position: absolute;
left: 50%;
bottom: 5px;
transform: translateX(-50%);
min-width: 50px;
line-height: 50px;
font-size: 20px;
border-radius: 12px;
color: white;
text-align: center;
background: transparent;
box-shadow: 0 5px 10px rgba(0, 0, 0, 1.0);
border: 2px solid rgb(255, 255, 255, 0.0);
}
.sidebar.active .social_media #log_out {
left: 87%
}
.social_media #log_out:hover {
border-color: #007bff;
}
.home_content {
position: absolute;
height: 100%;
width: calc(100% - 78px);
left: 78px;
transition: all 0.5s ease;
}
.home_content .text {
font-size: 25px;
font-weight: 500;
color: #b4b3be;
margin: 12px;
}
.sidebar.active~.home_content {
width: calc(100% -240px);
left: 240px;
}
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
<div class="sidebar">
<div class="logo_content">
<div class="logo">
<i class='bx bxs-graduation'></i>
<div class="logo_name">My Portfolio</div>
</div>
<i class='bx bx-menu' id="btn"></i>
</div>
<ul class="nav_list">
<li>
<i class='bx bx-search'></i>
<input type="text" placeholder="Search...">
<span class="tooltip">Search</span>
</li>
<li>
<a href="#">
<i class='bx bx-grid-alt'></i>
<span class="links_name">Dashboard</span>
</a>
<span class="tooltip">Dashboard</span>
</li>
<li>
<a href="#">
<i class='bx bx-user'></i>
<span class="links_name">User</span>
</a>
<span class="tooltip">User</span>
</li>
<li>
<a href="#">
<i class='bx bx-chat'></i>
<span class="links_name">Messages</span>
</a>
<span class="tooltip">Messages</span>
</li>
<li>
<a href="#">
<i class='bx bx-pie-chart-alt-2'></i>
<span class="links_name">Analytics</span>
</a>
<span class="tooltip">Analytics</span>
</li>
<li>
<a href="#">
<i class='bx bx-folder'></i>
<span class="links_name">File Manager</span>
</a>
<span class="tooltip">File Manager</span>
</li>
<li>
<a href="#">
<i class='bx bx-cart-alt'></i>
<span class="links_name">Order</span>
</a>
<span class="tooltip">Order</span>
</li>
<li>
<a href="#">
<i class='bx bx-heart'></i>
<span class="links_name">Saved</span>
</a>
<span class="tooltip">Saved</span>
</li>
<li>
<a href="#">
<i class='bx bx-cog'></i>
<span class="links_name">Settings</span>
</a>
<span class="tooltip">Settings</span>
</li>
</ul>
<div class="social_media">
<a href="index.html"><i class='bx bxl-linkedin-square' id="linked" ></i></a>
<a href="index.html">#<i class="bx bx-log-out" id="log_out"></i></a>
</div>
</div>
<div class="home_content">
<div class="text"> Header hier</div>
</div>
I tried modifying the blur effect, also tried modifying the Z-value. Neither modifications had any effect on outcome.