2
I am trying to make on my website a button that is Sticky, by clicking on that button, it makes a Collapse right and shows a container with a certain number of colors available for the user to choose, the user when choosing the color pallette, the site will change the layout color to the pallette chosen by the user...
My code so far...
HTML:
<!---- color changer ---->
<div class="color-chg">
<a href="#" class="color-btn"><i class="ion-ios-settings-strong"></i></a>
</div>
CSS:
.color-chg {
position: fixed;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
z-index: 2000;
}
/* Stylyng the icon */
.color-chg a {
display: block;
text-align: center;
padding: 30px;
transition: all 0.3s ease;
color: white;
font-size: 100%;
}
.color-chg a:hover {
background-color: white;
color: #74c8d2;
border: 2px solid #74c8d2;
}
.color-btn {
border: 2px solid transparent;
background: #74c8d2;
color: white;
}
What I want:
Please give me some tips, I have no idea how to do this, I searched, but I can’t find anything on the internet, I’ve been checking the source code of this site, but it doesn’t help much...
Personal thank you!
Cara I think the best way to do this hj is with CSS Variables, currente-color, inherit and JS. But it’s something you have to plan at the beginning of the project. To implement this on the site after starting the development can be quite laborious... If it’s something simpler to change the color of just one thing or another, just between 2 colors for example tell me that I give you a hand
– hugocsl
No, but my problem is even in building the static structure, namely the container with the colors, the Collapse, etc... The rest I can do with javascript because I already have the scheme planned...
– Nelson Pacheco