atomic-css/index.html

89 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<style>
.block
{
position:relative;
display: flex;
align-items: stretch;
margin: 0;
padding: 0;
border: 0;
background:lightgrey;
border-radius: 5px;
}
.block > *
{
padding:10px 0 10px 10px;
}
.block > *:last-child
{
padding-right: 10px;
}
.block label
{
width:100%;
}
.block input[type='radio']
{
display: block;
position: relative;
margin: 0;
appearance: none;
}
.block input[type='radio']::before
{
content: " ";
display: block;
position: relative;
width: 17px;
height: 17px;
border: 2px solid #000;
border-radius: 20px;
}
.block input[type='radio']:checked::after
{
content: " ";
display: block;
position: absolute;
width: 11px;
height: 11px;
top: 15px;
left: 15px;
border-radius: 20px;
background: #000;
}
</style>
</head>
<body>
<form>
<div class="block">
<input id="check-1" type="radio" name="slot-1" value="option-1"/>
<label for="check-1">
<strong>Credit Card</strong><br>
<span>Credit Card</span><br>
<span>Credit Card</span><br>
<span>Credit Card</span><br>
<span>Credit Card</span>
</label>
<a href="/">Change</a>
</div>
<div class="block">
<input id="check-2" type="radio" name="slot-1" value="option-2"/>
<label for="check-2">
<strong>Paypal</strong><br>
<span>also good</span>
</label>
<a href="/">Change</a>
</div>
</form>
</body>
</html>