Coder Wrap provides free to use snippets Coder Wrap provides free to use snippets

🗙
Login
Register

Create Account

Cancel
Back to Others
Preview Source Code
Download
HTML
CSS
/**Typeo CSS Start**/
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

* {
 box-sizing: border-box;
}

body {
 font-family: "Poppins", sans-serif;
 color: #444;
 box-sizing: border-box;
 margin: 0px;
}

img {
 max-width: 100%;
}

/**Typeo CSS End**/
.clrpicker {
 width: 180px;
 margin: 20px auto;
 border: #ccc 2px solid;
 padding: 10px 18px;
}

.clrpicker label {
 text-transform: uppercase;
 font-weight: 600;
}

.clrpicker input {
 width: 100%;
 height: 50px;
 margin-top: 9px;
}

.coloritem-box {
 max-width: 900px;
 width: 100%;
 margin: 20px auto;
}

.coloritem-box img {
 border: #ccc 5px solid;
}

.coloritem-box .title {
 font-size: 30px;
 margin: 12px 0px;
}

.coloritem-box .date {
 padding: 6px 14px;
 border-width: 2px;
 border-style: solid;
 display: inline-block;
 font-weight: 700;
}

.coloritem-box .rm-btn {
 padding: 10px 30px;
 line-height: normal;
 display: inline-block;
 text-decoration: none;
 color: #fff;
 text-transform: uppercase;
}
JS
let colorpicker = document.getElementById('colorpicker');
 setInterval(()=>{
let themecolors = document.querySelectorAll('.themeclr');
let bgThemeclr = document.querySelectorAll('.bgThemeClr');
let bdrThemeClr = document.querySelectorAll('.bdrThemeClr');
//const cmnClr = themecolors +  bgThemeclr + bdrThemeClr;

let color = colorpicker.value;
//Text Color
themecolors.forEach(function (tColor) {
    tColor.style.color = color;
 });
//BG Color
  bgThemeclr.forEach(function (tColor) {
    tColor.style.backgroundColor = color;
 });
//Border Color
bdrThemeClr.forEach(function (tColor) {
    tColor.style.borderColor = color;
});

}, 200);

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *