JSFiddle - React, Tailwind, and code Playground
HTML
<a id="post-nav-next" class="post-nav" href="#" style="background-image: home-icon-1.png);"><span>Home</span></a>
CSS
a.post-nav {
height: 100px;
display: block;
cursor: pointer;
color: #999999;
background-color: #000000;
background-repeat: no-repeat;
}
a.post-nav span {
display: none;
padding: 0 20px 0 20px;
line-height: 100px;
}
a#post-nav-next {
padding: 0 100px 0 0;
position: fixed;
top: 160px;
left: 0;
background-position: right center;
cursor: pointer;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
-moz-border-radius-topright: 4px;
-moz-border-radius-bottomright: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
}
a#post-nav-prev {
padding: 0 0 0 100px;
position: fixed;
top: 160px;
right: 0;
background-position: left center;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-bottomleft: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
}
JavaScript
jQuery(document).ready(function() {
// Animate the single page nav
jQuery("a#post-nav-next").hover(
function(){
jQuery("a#post-nav-next span").stop(true, true).animate({width: "toggle", opacity: "toggle"});
}
);
});