I'm struggling to make an active icon selector work with the after pseudo element. Here is the code I have attempted:
<html>
<head>
<style type="text/css">
.btn{
width:25%;
}
.name{
background: #fff;
color: #000;
text-align: center;
height: 35px;
line-height: 35px;
font-size: 18px;
border: 1px solid;
}
.name:after{
content: "";
position: absolute;
left: 210px;
top: 19px;
background-image: url('dark.png');
width: 15px;
height: 15px;
background-size: 100% auto;
}
.name:after:active{
background-image: url('light.png');
}
</style>
</head>
<body>
<div class="btn name">Submit</div>
</body>
</html>
Please provide guidance on how to successfully implement the active selector using the after pseudo-element. Thank you in advance.