JSFiddle - React, Tailwind, and code Playground
HTML
<pre>
Click me: <a href="http://www.gbin1.com">www.gbin1.com</a>
</pre>
CSS
pre {
background: url("images/source.jpg") no-repeat scroll 0 0 #333333;
border: 2px solid #555555;
color: #fff;
font-family: arial;
margin: 0;
overflow: scroll !important;
padding: 30px 0 20px;
position: relative;
width: 520px;
display: block;
}
pre a{
color: #E3E3E3;
}
JavaScript
$(document).ready(function(){
$('pre').hover(
function(){
if($(this).width()==520){
$(this).animate({width:'800'},400);
$(this).css({border:'2px solid #2B99E6'});
}
},
function(){
if($(this).width()==800){
$(this).animate({width:'520'},400);
$(this).css({border:'2px solid #555555'});
}
}
);
});