<div class="example"></div>
.example {
width: 300px;
height: 50px;
margin: 50px auto;
background: yellow;
cursor: pointer;
position: relative;
}
.example:before {
content: '';
display: block;
width: 0;
height: 5px;
background: red;
position: absolute;
left: 50%;
bottom: 0;
transition: .5s;
}
.example:hover:before {
width: 100%;
left: 0;
}
<div class="example"></div>
.example {
width: 300px;
height: 50px;
background: yellow;
cursor: pointer;
position: relative;
margin: 50px auto;
}
.example:before {
content: '';
display: block;
width: 0;
height: 5px;
background: red;
position: absolute;
left: 0;
bottom: 0;
transition: .5s;
}
.example:hover:before {
width: 100%;
}
<div class="block">
<a href="#" class="more">
read more
</a>
</div>
.block{
width: 200px;
height: 200px;
background: #bebebe;
position: relative;
}
.more{
position: absolute;
right: 10px;
bottom: 10px;
}
@font-face {
font-family: 'Play';
src: url('../fonts/play-regular-webfont.eot');
src: url('../fonts/play-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/play-regular-webfont.woff2') format('woff2'),
url('../fonts/play-regular-webfont.woff') format('woff'),
url('../fonts/play-regular-webfont.ttf') format('truetype'),
url('../fonts/play-regular-webfont.svg#playregular') format('svg');
font-weight: normal;
font-style: normal;
}