Commit 9d98ef9c authored by Ferry Jérémie's avatar Ferry Jérémie

nouvelle intération

parent 819878d5
......@@ -131,15 +131,17 @@ p {
background-repeat: no-repeat;
}
.pre.mouton {
margin-top: -2%;
}
#pre1 {
margin-top: 1%;
background-image: url("img/enclos-lapins.svg");
}
#pre2 {
background-image: url("img/enclos-moutons.svg");
}
#pre3 {
margin-top: 1%;
background-image: url("img/enclos-poules.svg");
}
#pre4 {
......@@ -200,7 +202,7 @@ p {
position: relative;
height: 62%;
width: 38%;
padding: 1% 6% 3% 9%;
padding: 2% 6% 3% 9%;
margin-top: -15%;
clip-path: polygon(13.09% 8px, 99.66% 5.1%, 89.25% 125.15%, 1.84% 101.16%);
}
......@@ -214,7 +216,7 @@ p {
}
#masque-enclos1, #masque-enclos2 {
padding-top: 4%;
padding-top: 2%;
height: 55%;
clip-path: polygon(13.09% 8px, 99.66% 5.1%, 89.25% 125.15%, 1.84% 101.16%);
}
......@@ -265,7 +267,7 @@ img.animal1 {
#action {
width: 90vw;
height: 90vw;
margin-top: 15%;
margin-top: 18%;
position: absolute;
top: 50%;
left: 50%;
......@@ -298,10 +300,14 @@ img.animal1 {
#enclos3, #enclos4 {
height: 64%;
}
.erreur {
font-size: 5vw;
}
}
@media screen and (min-aspect-ratio: 7/6) {
#drag-zone, #action {
margin-top: 5vh;
padding: 0;
width: 100vh;
height: 100vh;
......
......@@ -251,7 +251,7 @@ function getIndiceAnimal(animal) {
}
function getIndiceEnclos(enclos) {
return parseInt(enclos.charAt(6) - 1);
return parseInt(enclos.charAt(13) - 1);
}
function getImgAnimalparEnclos() {
......@@ -275,7 +275,6 @@ function getImgAnimalparEnclos() {
break;
}
}
}
function allowDrop(ev) {
......@@ -369,6 +368,10 @@ function afficheExercice() {
Modele2.style.backgroundImage = "url('img/bulle.png')";
Modele3.style.backgroundImage = "url('img/bulle.png')";
Modele4.style.backgroundImage = "url('img/bulle.png')";
Modele1.parentNode.classList.add(classAnimalparEnclos[0].replace('-mini', ''));
Modele2.parentNode.classList.add(classAnimalparEnclos[1].replace('-mini', ''));
Modele3.parentNode.classList.add(classAnimalparEnclos[2].replace('-mini', ''));
Modele4.parentNode.classList.add(classAnimalparEnclos[3].replace('-mini', ''));
Modele1.innerHTML = '<img src="' + imgAnimalparEnclos[0] + '" class="' + classAnimalparEnclos[0] + '"> ' + solution[AnimalparEnclos[0]][0];
Modele2.innerHTML = '<img src="' + imgAnimalparEnclos[1] + '" class="' + classAnimalparEnclos[1] + '"> ' + solution[AnimalparEnclos[1]][1];
Modele3.innerHTML = '<img src="' + imgAnimalparEnclos[2] + '" class="' + classAnimalparEnclos[2] + '"> ' + solution[AnimalparEnclos[2]][2];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment