1
how do I add edge to a img
correctly because I am adding the edge to the img
and it seems to get bigger than the others.
I am adding by click using jquery when I click on img
mark her with a 2px green border as do not happen to add the edge and the img
not increase?
$('input[type=checkbox]').on('change', function () {
var total = $('input[type=checkbox]:checked').length;
$("#count").text("Fotos selecionadas: " + total);
$(this).closest('.hovereffect').toggleClass('clic');
});
.hovereffect {
width:100%;
height:100%;
float:left;
overflow:hidden;
position:relative;
margin-bottom: 25px;
text-align:center;
cursor:default;
box-shadow: 0px 0px 5px 1px rgba(0,0,0,.2);
}
.hovereffect .overlay {
width:100%;
height:100%;
position:absolute;
overflow:hidden;
top:0;
padding: 15px;
left:0;
opacity:0;
background-color:rgba(0,0,0,0.5);
-webkit-transition:all .4s ease-in-out;
transition:all .4s ease-in-out
}
.hovereffect img {
display:block;
position:relative;
-webkit-transition:all .4s linear;
transition:all .4s linear;
}
.hovereffect h2 {
/*text-transform:uppercase;*/
color:#fff;
text-align:center;
position:relative;
font-size:22px;
/*background:rgba(0,0,0,0.6);*/
-webkit-transform:translatey(-100px);
-ms-transform:translatey(-100px);
transform:translatey(-100px);
-webkit-transition:all .2s ease-in-out;
transition:all .2s ease-in-out;
padding:10px;
}
.hovereffect a.info {
text-decoration:none;
display:inline-block;
text-transform:uppercase;
color:#fff;
/*border:1px solid #fff;*/
background-color:transparent;
opacity:0;
filter:alpha(opacity=0);
-webkit-transition:all .2s ease-in-out;
transition:all .2s ease-in-out;
margin:0 0 0;
padding:7px 14px;
}
.hovereffect a.info:hover {
/*box-shadow:0 0 5px #fff;*/
}
.hovereffect:hover img {
-ms-transform:scale(1.2);
-webkit-transform:scale(1.2);
transform:scale(1.2);
}
.hovereffect:hover .overlay {
opacity:1;
filter:alpha(opacity=100);
}
.hovereffect:hover h2,.hovereffect:hover a.info {
opacity:1;
filter:alpha(opacity=100);
-ms-transform:translatey(0);
-webkit-transform:translatey(0);
transform:translatey(0);
}
.hovereffect:hover a.info {
-webkit-transition-delay:.2s;
transition-delay:.2s;
}
.col-lg-3{
width: 30%;
}
.bloco{
background-color: rgba(0,0,0,0.67);
width: 100%;
height: 100%;
opacity: 0;
position: absolute;
padding: 17px;
top: 0;
-webkit-transition: all .4s ease-out;
}
h2{
font-family: 'Courgette', cursive;
}
.corr{
background-color: #2ecc71;
width: 40px;
height: 40px;
border-radius: 30px;
position: absolute;
padding: 10px;
margin-top: -10px;
/* margin: 0 auto; */
left: 0;
/* top: 50%; */
}
.btn-group, .btn-group-vertical{
position: absolute;
top: 50px;
left: 50%;
margin-left: -43px;
}
.clic{
border: 3px solid #1abc9c;
}
#count{
font-family: 'Courgette', cursive;
}
.sweet-alert{
border-radius: 0px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
<div class="hovereffect">
<img class="img-responsive" src="http://guanambiacontece.com/wp-content/uploads/2016/01/iron-man-rep-300x200.jpg">
<div class="overlay">
<div class="pad">
<h2></h2>
<div class="btn-group" data-toggle="buttons">
<label class="check btn btn-primary">
<input type="checkbox" name="ck[]">Selecionar</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I’ve gone up to 1 min only
– Leonardo Costa
face the code and this is only the border the code is already in Perg posted the img to exemplify
– Leonardo Costa
You didn’t put the selector and HTML, it’s kind of hard to deduce. But okay, test the answers below, if nothing goes right post html and CSS so that we can reproduce the problem, ;)
– Guilherme Nascimento
our and vdd I only put one thing vo arrange mals
– Leonardo Costa
arranged my question
– Leonardo Costa
yes it repeats for every img you have in the bank
– Leonardo Costa
you do here in a little while update
– Leonardo Costa
updated the response with the jsfiddle link
– Leonardo Costa
like that descent of the img when I select and normal that?
– Leonardo Costa
intendi obg for the answer
– Leonardo Costa
I don’t function like when you click on img it seems that it gives a 3px padding in img
– Leonardo Costa