1
This is a basic model using the brother selector ~
and filter
to change the color of the image. But the balls have to come before the image to be cool. For the balls to be on the bottom and still the dial ~
work as expected I used rotate()
and flex
Jada adjust.
See the code to better understand
.box {
display: flex;
justify-content: center;
width: 300px;
border: 1px solid #000;
flex-wrap: wrap;
transform: rotate(180deg);
flex-direction: row-reverse;
}
.cor {
width: 24px;
height: 24px;
border-radius: 50%;
margin: 10px;
background-color: red;
cursor: pointer;
}
.cor:hover {
transform: scale(1.2);
}
.red:hover ~ img {
filter: grayscale(100%) sepia(100%) hue-rotate(-60deg) saturate(8);
}
.blue {
background-color: blue;
}
.blue:hover ~ img {
filter: grayscale(100%) sepia(100%) hue-rotate(200deg) saturate(8);
}
.green {
background-color: green;
}
.green:hover ~ img {
filter: grayscale(100%) sepia(100%) hue-rotate(90deg) saturate(8);
}
.box img {
width: 45%;
height: 45%;
object-fit: contain;
margin: 20px;
transform: rotate(180deg);
}
<div class="box">
<div class="cor red"></div>
<div class="cor blue"></div>
<div class="cor green"></div>
<img src="https://placecage.com/100/100">
</div>
Do you have the element code? Do you have access to HTML and CSS to customize things? The dots can be at the top?
– hugocsl
I can customize everything...
– Betinho Silva
Want a tutorial or help :D
– Betinho Silva
It doesn’t help much if you ask us for something and don’t even display the code where you’re trying to make it happen
– riki481