Simple checkbox style

Developer
Size
2,628 Kb
Views
14,168

How do I make an simple checkbox style?

What is a simple checkbox style? How do you make a simple checkbox style? This script and codes were developed by Vincenzo on 07 October 2022, Friday.

Simple checkbox style Previews

Simple checkbox style - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple checkbox style</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ html, body { height: 100%; min-height: 100%;
}
body { display: flex; flex-direction: row; justify-content: center; align-items: center;
}
input[type="checkbox"] { position: relative; margin: .4rem;
}
input[type="checkbox"]:before { content: ' '; background: white; border: 0.15rem solid #1a998a; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; width: 0.9rem; height: 0.9rem; transition: background .3s ease-in-out;
}
input[type="checkbox"]:checked:before { background: #1a998a;
}
input[type="checkbox"]:checked:after { content: ' '; background: transparent; border-left: .2rem solid white; border-bottom: .2rem solid white; position: absolute; top: 5%; left: 10%; width: 60%; height: 30%; z-index: 2; transform: rotate(-45deg);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <input type="checkbox" name="test" id="test" checked/><label for="test">Check me</label>
</body>
</html>

Simple checkbox style - Script Codes CSS Codes

html, body { height: 100%; min-height: 100%;
}
body { display: flex; flex-direction: row; justify-content: center; align-items: center;
}
input[type="checkbox"] { position: relative; margin: .4rem;
}
input[type="checkbox"]:before { content: ' '; background: white; border: 0.15rem solid #1a998a; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; width: 0.9rem; height: 0.9rem; transition: background .3s ease-in-out;
}
input[type="checkbox"]:checked:before { background: #1a998a;
}
input[type="checkbox"]:checked:after { content: ' '; background: transparent; border-left: .2rem solid white; border-bottom: .2rem solid white; position: absolute; top: 5%; left: 10%; width: 60%; height: 30%; z-index: 2; transform: rotate(-45deg);
}
Simple checkbox style - Script Codes
Simple checkbox style - Script Codes
Home Page Home
Developer Vincenzo
Username vncnz
Uploaded October 07, 2022
Rating 3
Size 2,628 Kb
Views 14,168
Do you need developer help for Simple checkbox style?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Vincenzo (vncnz) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!