I'm trying to make box-shadow work like a slide animation over an img, by making the black background coming over from left to right. But I can't do it without this weird blinking problem. I've already looked for solutions around Stack Overflow.
I also tried it with a section instead of an img, but the result was the same.
HTML
<section>
</section>
CSS
section {
border:black 1px solid;
width:500px;
height:200px;
transition:1s ease-out
}
section:hover{
box-shadow:inset 500px 0 0 #222;
float:left;
transition:1s ease-out;
}