<div class="wrapper">
<p class="item item01">hover</p>
<p class="item item02">hover</p>
<p class="item item03">hover</p>
<p class="item item04">hover</p>
</div>
.item{
width: 200px;
padding: 10px 0;
margin: 25px auto 0;
box-sizing: border-box;
text-align: center;
color: #fff;
font-size: 24px;
font-weight: bold;
cursor: pointer;
}
.item01{
background: #009933;
border: 2px solid #009933;
transition: all .2s ease-in-out;
}
.item01:hover{
width: 250px;
}
.item02{
background: #ff6600;
padding: 12px 0;
position: relative;
overflow: hidden;
}
.item02:before,
.item02:after{
content: '';
position: absolute;
left: 0;
width: 100%;
height: 8px;
box-sizing: border-box;
background: #ff9900;
transition: all .2s ease-in;
}
.item02:before{
top: -8px;
}
.item02:after{
bottom: -8px;
}
.item02:hover:before{
top: 0;
}
.item02:hover:after{
bottom: 0;
width: 100%;
}
.item03{
padding: 12px 0;
background: #1A76C4;
transition: all .4s;
}
.item03:hover{
border-radius: 50px;
}
.item04{
background: #ff0000;
border: 2px solid #ff0000;
transition: all .2s linear;
}
.item04:hover{
background: #ffffff;
border: 2px dotted #ff0000;
color: #ff0000;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.