-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3581802
commit 809009e
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="es"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>¿Me amas?</title> | ||
<link rel="stylesheet" type="text/css" href="style.css"> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<p id="question">¿Me amas?</p> | ||
<button id="yesButton">¡Si, con locura!</button> | ||
<button id="noButton">No</button> | ||
<p id="responseMessage" style="display:none;">¡Yo tambien te amo!</p> | ||
</div> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
document.getElementById('noButton').addEventListener('mouseover', function() { | ||
this.style.position = 'absolute'; | ||
this.style.top = Math.random() * window.innerHeight + 'px'; | ||
this.style.left = Math.random() * window.innerWidth + 'px'; | ||
}); | ||
|
||
document.getElementById('yesButton').addEventListener('click', function() { | ||
document.getElementById('yesButton').style.display = 'none'; | ||
document.getElementById('noButton').style.display = 'none'; | ||
document.getElementById('responseMessage').style.display = 'block'; | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
background-color: #f0f0f0; /* Light grey background */ | ||
} | ||
|
||
#content { | ||
text-align: center; | ||
padding: 10px; /* Added padding for smaller screens */ | ||
} | ||
|
||
#question { | ||
font-size: 24px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
button { | ||
font-size: 20px; | ||
padding: 10px 20px; | ||
margin: 5px; | ||
cursor: pointer; | ||
background-color: #fff; /* White background for buttons */ | ||
border: 1px solid #ddd; /* Light grey border */ | ||
border-radius: 5px; /* Rounded corners */ | ||
} | ||
|
||
#responseMessage { | ||
font-size: 20px; | ||
color: #4CAF50; /* Green color for the response message */ | ||
} | ||
|
||
/* Media query for smaller screens */ | ||
@media (max-width: 600px) { | ||
#question, button, #responseMessage { | ||
font-size: 18px; /* Smaller font size for smaller screens */ | ||
} | ||
} |