It's a very simple question, but I did not find an answer ...
I have an element that has a borda
of 1px
. But when I make a :hover
on it I apply a transform:scale()
but the width of the borda
of it tb seems to increase, until I tried to put 0.01px
, but it did not work.
Is there any way to fix this without having to create a pseudo-element ?
body {
margin: 2rem;
}
.box {
float: left;
width: 100px;
height: 100px;
border: 1px solid #000;
margin-right: 1rem;
transition: transform 500ms;
}
.box:hover {
transform: scale(2) translate(25%, 25%);
border: 0.1px solid #000;
}
<div class="box"></div>