Template
1
0

added dom

This commit is contained in:
2025-11-20 17:25:11 +03:00
parent 50443223cd
commit 864bbef52d
353 changed files with 7926 additions and 2542 deletions

View File

@@ -0,0 +1,67 @@
.container {
display: inline-block;
vertical-align: top;
font-size: 0px;
}
.theButton {
height: 80px;
width: 266px;
border-radius: 8px;
text-align: center;
background-color: #555;
color: #FFF;
font-family: dosis;
font-size: 30px;
padding-top: 30px;
border: solid 2px #fff; /* border used to stop jump when border is applied*/
}
.superButton {
height: 80px;
width: 100%;
border-radius: 8px;
text-align: center;
background-color: #555;
color: #FFF;
font-family: dosis;
font-size: 30px;
padding-top: 30px;
/* display: none;*/
border: solid 2px #fff; /* border used to stop jump when border is applied*/
}
p {
font-family: dosis;
font-size: 20px;
margin-left: 10px;
width:240px;
}
.makeBlue {
background-color: #81BBC9;
}
.makeBorder {
border: solid 2px #000;
}
.green {
background-color: #008000;
}
.red {
background-color: #FF0000;
}
.blue {
background-color: #0000FF;
}
.selected{
background-color: #F07D00;
}
/*make sure to add after all other color classes to advoid cascade issues*/
.makeBlack {
background-color: #000000;
}

View File

@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Challenge A</title>
<!--add css here-->
<link rel='stylesheet' href='css/style.css'/>
<script
src="https://code.jquery.com/jquery-3.2.1.js"
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
crossorigin="anonymous"></script>
<link href='https://fonts.googleapis.com/css?family=Dosis' rel='stylesheet'>
</head>
<body>
<div class="superButton makeBlue">Reset</div>
<div id="panel">
<div class="container">
<div class="container">
<div class="theButton makeBlue red"></div>
</div>
<div class="container">
<div class="theButton makeBlue green"></div>
</div>
<div class="container">
<div class="theButton makeBlue blue"></div>
</div>
<div class="container">
<div class="theButton makeBlue blue"></div>
</div>
<div class="container">
<div class="theButton makeBlue red"></div>
</div>
<div class="container">
<div class="theButton makeBlue green"></div>
</div>
<div class="container">
<div class="theButton makeBlue red"></div>
</div>
<div class="container">
<div class="theButton makeBlue green"></div>
</div>
<div class="container">
<div class="theButton makeBlue blue"></div>
</div>
<div class="container">
<div class="theButton makeBlue green"></div>
</div>
</div>
</div> <!--ensures page has loaded when scripts placed at body bottom-->
<script src="js/script.js"></script>
</body>
</html>

View File

@@ -0,0 +1,8 @@
//waits until page is ready
$(document).ready(function(){
//will display rgb value of selected panel in the reset panel
$(".theButton").click(function() {
var col = $(this).css('background-color');
$('.superButton').text( col);
});
});