Created
May 31, 2016 16:29
-
-
Save kodamirmo/47487655dc289e8ef154a2906614c148 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#container { | |
width: 800px; | |
height: 600px; | |
position: relative; | |
} | |
.tamano { | |
width: 100%; | |
height: 100%; | |
position: absolute; | |
top: 0; | |
left: 0; | |
} | |
#texto { | |
background-color:rgba(255,0,0,0.5); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
console.log(':D'); | |
$('#texto').hide(); | |
$('#container').mouseover(function(){ | |
console.log('Focus'); | |
$('#texto').show(); | |
}); | |
$('#container').mouseleave(function(){ | |
console.log('Focusggggg'); | |
$('#texto').hide(); | |
}); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Smash Faces</title> | |
<link rel="stylesheet" href="css/main.css"> | |
</head> | |
<body> | |
<div id="container"> | |
<div class="tamano" id="imagen"> | |
<img src="http://www.proify.com/wp-content/uploads/2015/04/landscape-photography-competition.jpg"> | |
</div> | |
<div class="tamano" id="texto"> | |
<h1>BIEN</h1> | |
</div> | |
</div> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.js"> | |
</script> | |
<script src="js/main.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment