Topic: Changing switch color
                  
                  jouvrard
                  pro
                  asked 7 years ago
                
<div class="switch success-switch"> <label> Off <input type="checkbox"> <span class="lever"></span> On </label> </div>I also tried directly on the sample page in the Quick Start Guide, but the result is the same. A solution? :)
                      
                      jouvrard
                      pro
                        answered 7 years ago
                    
Piotr Glejzer staff commented 7 years ago
It's no problem. But your idea to add different colors with class is good! I'm gonna think more about this. Have a nice day.
                      
                      Piotr Glejzer
                      staff
                        answered 7 years ago
                    
    .switch label input[type=checkbox]:checked+.lever {
    background-color: #1ffd01;
}
.switch label input[type=checkbox]:checked+.lever:after {
    background-color: #1201fa ;
}
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
 - Premium support: No
 - Technology: MDB jQuery
 - MDB Version: 4.5.9
 - Device: PC
 - Browser: All
 - OS: Windows 10
 - Provided sample code: No
 - Provided link: No