不需要使用jquery,它可以在没有jquery的情况下进行动画制作,但这项技术可能只适用于Google Chrome;
check this example.
div#entext
{
z-index:-1;
position: relative;
width:100%;
height:100%;
-webkit-clip-path: polygon(0 0, 40% 0, 60% 100%, 0 100%);
clip-path: polygon(0 0, 40% 0, 60% 100%, 0 100%);
background-color:#444444;
transition: all 1s;
}
#entextp:hover + #entext {
-webkit-clip-path: polygon(0 0%, 40% 0%, 40% 0%, 0 0%);
clip-path: polygon(0 0%, 40% 0%, 40% 0%, 0 0%);
background-color:rgba(255,255,255,0);
}