Example 1
I have an example in Codepen and in the Jsfiddle which I consider to be close to show you if it applies.
HTML
<ul>
<li>
<div class="circle"><img src="https://s3.amazonaws.com/uifaces/faces/twitter/boheme/128.jpg"/></div>
<h4>Steven Wilson</h4>
<input id="check-1" type="checkbox"/>
<label for="check-1"><i class="fa fa-check"></i></label>
</li>
<li>
<div class="circle"><img src="https://s3.amazonaws.com/uifaces/faces/twitter/allisongrayce/128.jpg"/></div>
<h4>Jamie Harden</h4>
<input id="check-2" type="checkbox"/>
<label for="check-2"><i class="fa fa-check"></i></label>
</li>
<li>
<div class="circle"><img src="https://s3.amazonaws.com/uifaces/faces/twitter/cacique/128.jpg"/></div>
<h4>Mike Portnoy</h4>
<input id="check-3" type="checkbox"/>
<label for="check-3"><i class="fa fa-check"></i></label>
</li>
</ul>
CSS
body {
background: #607D8B;
}
* {
box-sizing: border-box;
}
ul {
border-radius: 2px;
overflow: hidden;
width: 360px;
margin: 60px auto 0;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}
li {
width: 360px;
padding: 12px;
margin: auto;
position: relative;
overflow: hidden;
}
li.active h4 {
color: white;
}
li:before {
content: '';
width: 100%;
height: 100%;
display: block;
background: white;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
li .circle {
width: 40px;
height: 40px;
background: #ccc;
border-radius: 9999px;
display: inline-block;
vertical-align: middle;
margin-right: 12px;
position: relative;
z-index: 10;
overflow: hidden;
}
li .circle img {
width: 100%;
}
li h4 {
display: inline-block;
font-family: "Roboto", Helvetica, sans-serif;
font-weight: 500;
font-size: 20px;
margin: 0;
vertical-align: middle;
position: relative;
z-index: 10;
transition: all .5s;
}
li input {
vertical-align: middle;
display: none;
}
li input + label {
display: inline-block;
background: #ccc;
width: 24px;
height: 24px;
border-radius: 2px;
position: absolute;
right: 20px;
top: 20px;
text-align: center;
padding-top: 3px;
color: transparent;
cursor: pointer;
transition: all .2s;
}
li input + label:after {
content: '';
background: rgba(3, 169, 244, 0.5);
width: 10px;
height: 10px;
position: absolute;
right: 8px;
top: 8px;
border-radius: 9999px;
transition: all 0.3s ease-in;
z-index: -1;
}
li input:checked + label {
background: white;
color: #03a9f4;
}
li input:checked + label:after {
width: 1000px;
height: 1000px;
top: -500px;
right: -500px;
background: #03a9f4;
}
Javascript
$('label').click(function() {
$(this).parent('li').toggleClass('active');
});
I hope I’ve helped.
you have some code snippet you are working on?
– Pedro Sanção
@No sanction, because I could not leave the initial. Of course, to put the green border seems to me very simple, what makes it difficult are the top of the right.
– Luiz Negrini