정답입니다!
오답입니다!

정답입니다!
오답입니다!

정답입니다!
오답입니다!

정답입니다!
오답입니다!
Source
//선택자
const quizType = document.querySelectorAll(".quiz__type"); //퀴즈종류
//변수 퀴즈타입의 내용을 쿼리셀랙터(태그, 아이디, 클래스 선택할 수 있는 것)로 선택한 요소 안에 넣겠다.
const quizNumber = document.querySelectorAll(".quiz__question .number"); //퀴즈 번호
const quizAsk = document.querySelectorAll(".quiz__question .ask"); //퀴즈 질문
const quizConfirm = document.querySelectorAll(".quiz__answer .confirm"); //퀴즈 확인 버튼
const quizResult = document.querySelectorAll(".quiz__answer .result"); //정답 결과
const quizInput = document.querySelectorAll(".quiz__answer .input"); //사용자 정답
const quizView = document.querySelectorAll(".quiz__view"); //강아지

//문제정보
//배열안 객체로 키와 값으로 데이터를 저장한다.
const quizInfo = [
    {
        answerType : "웹디자인기능사 2016년 01회",
        answerNum : "1",
        answerAsk : "한국산업표준(KS)에 따른 색의 3속성은 무엇인가?",
        answerResult : "Hue(색상),Value(명도),Chroma(채도)"
    }, //0
    {
        answerType : "웹디자인기능사 2016년 01회",
        answerNum : "2",
        answerAsk : "미적 대상을 구상하는 부분과 부분의 사이에 질적으로나 양적으로 모순되는 일 없이 질서가 잡혀 어울리는 것은 무엇인가?",
        answerResult : "조화"
    },//1
    {
        answerType : "웹디자인기능사 2016년 01회",
        answerNum : "3",
        answerAsk : "같은 크기의 형을 상, 하로 겹칠 때 위쪽의 것이 크게 보이는 착시현상은 무엇인가?",
        answerResult : "상방 거리의 과대착시"
    },//2
    {
        answerType : "웹디자인기능사 2016년 01회",
        answerNum : "4",
        answerAsk : "색광의 혼합에서 색을 혼합하면 할수록 높아지는 색의 속성은 무엇인가?",
        answerResult : "명도"
    }//3
    //arr은 배열을 출력하지만 현재 배열안 '객체'로 데이터를 저장했기 때문에 객체의 키 값을 구체적으로 선택하여 출력해주어야 한다.
    //키를 선택하지 않은 채로 출력하게 되면 무엇을 출력하라는 건지 인식하지 못하여 object로 값이 출력되는 오류가 난다.
];

// //일반 문제 출력
// quizType[0].textContent = quizInfo[0].answerType;
// quizType[1].textContent = quizInfo[1].answerType;
// quizType[2].textContent = quizInfo[2].answerType;
// quizType[3].textContent = quizInfo[3].answerType;
// // quizType
// quizNumber[0].textContent = quizInfo[0].answerNum + ". ";
// quizNumber[1].textContent = quizInfo[1].answerNum + ". ";
// quizNumber[2].textContent = quizInfo[2].answerNum + ". ";
// quizNumber[3].textContent = quizInfo[3].answerNum + ". ";
// // quizNumber
// quizAsk[0].textContent = quizInfo[0].answerAsk;
// quizAsk[1].textContent = quizInfo[1].answerAsk;
// quizAsk[2].textContent = quizInfo[2].answerAsk;
// quizAsk[3].textContent = quizInfo[3].answerAsk;
// // quizAsk
// quizResult[0].textContent = quizInfo[0].answerResult;
// quizResult[1].textContent = quizInfo[1].answerResult;
// quizResult[2].textContent = quizInfo[2].answerResult;
// quizResult[3].textContent = quizInfo[3].answerResult;
//  // quizResult

//  for문으로 문제 출력하기
//  반복적인 것들은 반복문인 for문을 이용하여 효율적으로 text 삽입이 가능하다.
for(let i=0; i<4; i++ ){
    quizType[i].textContent = quizInfo[i].answerType; //객체라서 키를 구체적으로 선언해주어야 오류 안난다.
    quizNumber[i].textContent = quizInfo[i].answerNum + ". ";
    quizAsk[i].textContent = quizInfo[i].answerAsk;
    quizResult[i].textContent = quizInfo[i].answerResult;
}

//정리
//quizType 변수에 선언한 태그에 quizInfo 변수의 배열안에 넣은 키와 값을 삽입하여 출력한다.
// quizType[i].textContent = quizInfo[i].answerType; 즉 오른쪽의 값을 왼쪽에 대입하는 것. 

//forEach()로 출력하기 arr.forEach(function(){});
//반복문 (4번 반복해준다.)
//arr = quizInfo
// quizInfo.forEach(function(el, i){
//     quizType[i].textContent = quizInfo[i].answerType;
//     quizNumber[i].textContent = quizInfo[i].answerNum + ". ";
//     quizAsk[i].textContent = quizInfo[i].answerAsk;
//     quizResult[i].textContent = quizInfo[i].answerResult;
// });

//for, forEach문을 사용해서 한 번에 작성.
quizInfo.forEach((el, i) => {
    quizType[i].textContent = quizInfo[i].answerType; //객체라서 키를 구체적으로 선언해주어야 오류 안난다.
    quizNumber[i].textContent = quizInfo[i].answerNum + ". ";
    quizAsk[i].textContent = quizInfo[i].answerAsk;
    quizResult[i].textContent = quizInfo[i].answerResult;
});

//정답숨기기(4개 숨기기)
// quizResult[0].style.display = "none";
// quizResult[1].style.display = "none";
// quizResult[2].style.display = "none";
// quizResult[3].style.display = "none";

//for문으로 정답 숨기기
for(let i=0; i<quizInfo.length; i++){
    quizResult[i].style.display = "none";
}

//forEach문으로 정답 숨기기
//forEach는 순서로 e > i > a 순으로 읽는다.
//즉 인덱스를 뽑고 싶다면 e 와 i를 모두 선언해주어야 출력이 가능하다.
quizInfo.forEach((e, i)=>{
    quizResult[i].style.display = "none";
});

//정답확인하기
//quizConfirm의 수가 1개가 아닌 4개로 여러개이기 때문에 forEach를 통해 이러한 정보를 선언해주어야 정상으로 이벤트 실행이 가능하다.
// quizConfirm.addEventListener("click",() => {
//     alert("ddd")
// });

quizConfirm.forEach((btn, num)=>{
    btn.addEventListener("click", ()=>{
        
        //사용자 정답
        const userWord = quizInput[num].value;
        
        //사용자 정답 = 문제 정답
        if(userWord == quizInfo[num].answerResult){ //num = 특별한 기능으로 넣은 것이 아니라 인덱스를 표현하기 위한 명칭으로 이해하면 된다. 1번 객체의 퀴즈 2번 객체의 퀴즈 등등
            //정답
            quizView[num].classList.add("like");
            quizConfirm[num].style.display = "none";
            quizResult[num].style.display = "block";
            quizInput[num].style.display = "none"
        } else {
            //오답
            quizView[num].classList.add("dislike");
            quizConfirm[num].style.display = "none";
            quizResult[num].style.display = "block";
            quizInput[num].style.display = "none"

        }
    });
});
//quizConfirm은 html에서 버튼의 선택자 명칭인 컨펌을 대입한 것이다. 그래서 결국 quizConfirm == btn이 되며 forEach를 통해 총4개의 버튼을 가져온다는 뜻이다.
//btn요소를 클릭할 시 이벤트가 실행되도록한다.
<main id="main">
    <div class="quiz__wrap">
        <div class="quiz">
            <span class="quiz__type"></span>
            <h2 class="quiz__question">
                <span class="number"></span>
                <div class="ask"></div>
            </h2>
            <div class="quiz__view">
                <div class="true">정답입니다!</div>
                <div class="false">오답입니다!</div>
                <div class="dog">
                    <div class="head">
                        <div class="ears"></div>
                        <div class="face"></div>
                        <div class="eyes">
                            <div class="teardrop"></div>
                        </div>
                        <div class="nose"></div>
                        <div class="mouth">
                            <div class="tongue"></div>
                        </div>
                        <div class="chin"></div>
                    </div>
                    <div class="body">
                        <div class="tail"></div>
                        <div class="legs"></div>
                    </div>
                </div>
            </div>
            <div class="quiz__answer">
                <input type="text" class="input" placeholder="정답을 적어주세요!">
                <button class="confirm">정답 확인</button>
                <div class="result"></div>
            </div>
        </div>
        <!-- quiz01 -->

        <div class="quiz">
            <span class="quiz__type"></span>
            <h2 class="quiz__question">
                <span class="number"></span>
                <div class="ask"></div>
            </h2>
            <div class="quiz__view">
                <div class="true">정답입니다!</div>
                <div class="false">오답입니다!</div>
                <div class="dog">
                    <div class="head">
                        <div class="ears"></div>
                        <div class="face"></div>
                        <div class="eyes">
                            <div class="teardrop"></div>
                        </div>
                        <div class="nose"></div>
                        <div class="mouth">
                            <div class="tongue"></div>
                        </div>
                        <div class="chin"></div>
                    </div>
                    <div class="body">
                        <div class="tail"></div>
                        <div class="legs"></div>
                    </div>
                </div>
            </div>
            <div class="quiz__answer">
                <input type="text" class="input" placeholder="정답을 적어주세요!">
                <button class="confirm">정답 확인</button>
                <div class="result"></div>
            </div>
        </div>
        <!-- quiz02 -->

        <div class="quiz">
            <span class="quiz__type"></span>
            <h2 class="quiz__question">
                <span class="number"></span>
                <div class="ask"></div>
            </h2>
            <div class="quiz__view">
                <div class="true">정답입니다!</div>
                <div class="false">오답입니다!</div>
                <div class="dog">
                    <div class="head">
                        <div class="ears"></div>
                        <div class="face"></div>
                        <div class="eyes">
                            <div class="teardrop"></div>
                        </div>
                        <div class="nose"></div>
                        <div class="mouth">
                            <div class="tongue"></div>
                        </div>
                        <div class="chin"></div>
                    </div>
                    <div class="body">
                        <div class="tail"></div>
                        <div class="legs"></div>
                    </div>
                </div>
            </div>
            <div class="quiz__answer">
                <input type="text" class="input" placeholder="정답을 적어주세요!">
                <button class="confirm">정답 확인</button>
                <div class="result"></div>
            </div>
        </div>
        <!-- quiz03 -->

        <div class="quiz">
            <span class="quiz__type"></span>
            <h2 class="quiz__question">
                <span class="number"></span>
                <div class="ask"></div>
            </h2>
            <div class="quiz__view">
                <div class="true">정답입니다!</div>
                <div class="false">오답입니다!</div>
                <div class="dog">
                    <div class="head">
                        <div class="ears"></div>
                        <div class="face"></div>
                        <div class="eyes">
                            <div class="teardrop"></div>
                        </div>
                        <div class="nose"></div>
                        <div class="mouth">
                            <div class="tongue"></div>
                        </div>
                        <div class="chin"></div>
                    </div>
                    <div class="body">
                        <div class="tail"></div>
                        <div class="legs"></div>
                    </div>
                </div>
            </div>
            <div class="quiz__answer">
                <input type="text" class="input" placeholder="정답을 적어주세요!">
                <button class="confirm">정답 확인</button>
                <div class="result"></div>
            </div>
        </div>
        <!-- quiz04 -->
    </div>
</main>
<!-- main -->
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:before,
*:after {
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    background-color: #f6f6f6;
    background-image:
        linear-gradient(90deg, #cdcccc 0px, #cdcccc 1px, transparent 1px, transparent 99px, transparent 100px),
        linear-gradient(#cdcccc 0px, #cdcccc 1px, transparent 1px, transparent 99px, transparent 100px),
        linear-gradient(#e0e0e0 0px, #e0e0e0 1px, transparent 1px, transparent 99px, transparent 100px),
        linear-gradient(90deg, #e0e0e0 0px, #e0e0e0 1px, transparent 1px, transparent 99px, transparent 100px),
        linear-gradient(transparent 0px, transparent 5px, #f6f6f6 5px, #f6f6f6 95px, transparent 95px, transparent 100px),
        linear-gradient(90deg, #e0e0e0 0px, #e0e0e0 1px, transparent 1px, transparent 99px, #e0e0e0 99px, #e0e0e0 100px),
        linear-gradient(90deg, transparent 0px, transparent 5px, #f6f6f6 5px, #f6f6f6 95px, transparent 95px, transparent 100px),
        linear-gradient(transparent 0px, transparent 1px, #f6f6f6 1px, #f6f6f6 99px, transparent 99px, transparent 100px),
        linear-gradient(#cdcccc, #cdcccc);
    background-size: 100px 100%, 100% 100px, 100% 10px, 10px 100%, 100% 100px, 100px 100%, 100px 100%, 100px 100px, 100px 100px;
}

#header {
    background: #262626;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    position: relative;
    z-index: 10;
    /*포지션 앱솔루트 속성을 줄 때는 기준점을 꼭 설정해주어야 한다.*/
}

#header::before {
    content: "";
    border: 4px ridge #A3A3A3;
    position: absolute;
    left: 5px;
    top: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    box-sizing: border-box;
    z-index: -1;
}

#header h1 {
    padding: 3px 3px 5px 10px;
    font-family: "DungGeunMo";
    font-size: 30px;
}

#header h1 a {
    color: #CB7A1D
}

#header h1 em {
    font-size: 16px;
    font-style: normal;
}

@media (max-width: 600px) {
    #header h1 em {
        display: none;
    }
}

#header nav {
    padding-right: 10px;
}

#header nav li {
    display: inline;
}

#header nav li a {
    color: #fff;
    padding: 0 10px;
    border: 1px dashed #fff;
    font-family: "DungGeunMo";
}

#header nav li.active a {
    color: #000;
    background: #fff;
}

#footer {
    background: #fff;
    text-align: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 150px;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 10000;
}

#footer a {
    color: #000;
    font-family: "DungGeunMo";
}

#footer a:hover {
    text-decoration: underline;
}

/*  quiz__wrap */
.quiz__wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 150px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.quiz {
    max-width: 500px;
    width: 100%;
    background-color: #fff;
    border: 8px ridge #cacaca;
    margin: 10px;
}

.quiz__type {
    background-color: #cacaca;
    text-align: center;
    display: block;
    font-size: 16px;
    border: 3px ridge #cacaca;
    color: #3b3b3b;
    font-family: "DungGeunMo";
    padding: 4px;
}

.quiz__question {
    border-top: 6px ridge #cacaca;
    border-bottom: 6px ridge #cacaca;
    padding: 13px 30px;
    font-family: "Cafe24Danjunghae";
    line-height: 1.3;
}

.quiz__question .number {
    color: rgb(255, 135, 7);
}

.quiz__question .ask {
    display: inline;
}

.quiz__answer {
    border-top: 6px ridge #cacaca;
    padding: 10px;
    background-color: #f5f5f5;
}

.quiz__answer .input {
    width: 100%;
    border: 6px ridge #cacaca;
    font-size: 22px;
    padding: 13px 20px;
    background-color: #fff;
    font-family: "Cafe24Danjunghae";
    margin-bottom: 10px;
    box-sizing: border-box;
}

.quiz__answer .confirm {
    border: 6px ridge #cacaca;
    width: 100%;
    font-size: 22px;
    padding: 13px 20px;
    background-color: #d6d6d6;
    font-family: "Cafe24Danjunghae";
    cursor: pointer;
}

.quiz__answer .result {
    width: 100%;
    font-size: 22px;
    padding: 13px 20px;
    border: 6px ridge #cacaca;
    box-sizing: border-box;
    text-align: center;
    font-family: "Cafe24Danjunghae";
}

.quiz__view {
    background-color: #f5f5f5;
    font-family: "Cafe24Danjunghae";
    position: relative;
    overflow: hidden;
}

.quiz__view .true {
    width: 120px;
    height: 120px;
    line-height: 120px;
    /*한 줄 일 때 가운데로 오게해줌*/
    background-color: #eaa000;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    position: absolute;
    left: 70%;
    top: 100px;
    opacity: 0;
}

.quiz__view .false {
    width: 120px;
    height: 120px;
    line-height: 120px;
    background-color: rgb(126, 48, 48);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    position: absolute;
    right: 70%;
    top: 100px;
    opacity: 0;
}

.quiz__view.like .true {
    opacity: 1;
    animation: wobble 0.6s;
}

.quiz__view.dislike .false {
    opacity: 1;
    animation: wobble 0.6s;
}

.quiz__selects {
    margin: 5px 0;
}

.quiz__selects label {
    display: flex;
}

.quiz__selects label input {
    position: absolute;
    left: -9999px;
}

.quiz__selects label span {
    font-size: 20px;
    line-height: 1.3;
    font-family: "Cafe24Danjunghae";
    padding: 10px;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
}

.quiz__selects label span::before {
    content: '';
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    margin-right: 15px;
    display: flex;
    flex-shrink: 0; 
    box-shadow: inset 0px 0px 0px 4px #ffae00;
    transition: all 0.25s;
}

.quiz__selects label input:checked + span {
    background-color: #e2e1de;
} 
/* input박스를 checked 한 상태일 때 스타일이 나타나도록 함. */
/* 즉 input이 checked일 때 형제인 span과 함께 스타일을 적용시키는 것. */

.quiz__selects label input:checked + span::before {
    box-shadow: inset 0px 0px 0px 10px #ffae00;
}

.quiz__confirm {
    width: 100%;
    text-align: center;
}
.quiz__confirm .check {
    font-size: 22px;
    line-height: 1.3;
    padding: 13px 60px;
    border: 6px ridge #cacaca;
    box-sizing: border-box;
    text-align: center;
    font-family: "Cafe24Danjunghae";
    cursor: pointer;
    margin: 40px 0;
    transition: background 0.3s;
}
.quiz__confirm .check:hover {
    background-color: #fec32e56;
}


@keyframes wobble {
    0% {
        transform: translateX(0) rotate(0deg);
    }

    15% {
        transform: translateX(-25%) rotate(-5deg);
    }

    30% {
        transform: translateX(20%) rotate(3deg);
    }

    45% {
        transform: translateX(-15%) rotate(-3deg);
    }

    60% {
        transform: translateX(10%) rotate(2deg);
    }

    75% {
        transform: translateX(-5%) rotate(-1deg);
    }

    100% {
        transform: translateX(0) rotate(0deg);
    }
}

/* dog */
.dog .tail,
.dog .chin,
.dog .tongue::before,
.dog .tongue::after,
.dog .mouth,
.dog .nose,
.dog .teardrop,
.dog .eyes,
.dog .face::before,
.dog .face::after,
.dog .ears::before,
.dog .ears::after {
    transition: 0.2s ease-in;
}

.dog {
    padding-top: 50px;
}

.dog .head,
.dog .body {
    position: relative;
    width: 115px;
}

.dog .head {
    height: 115px;
    border-radius: 50% 50% 0 0;
    margin: 0 auto;
}

.dog .ears {
    position: relative;
    top: -14%;
    width: 100%;
}

.dog .ears::before,
.dog .ears::after {
    content: "";
    position: absolute;
    top: 0;
    width: 35px;
    height: 70px;
    background: #CB7A1D;
    border-top: 11px solid #F7AA2B;
    border-left: 7px solid #F7AA2B;
    border-right: 7px solid #F7AA2B;
}

.dog .ears::before {
    left: 0;
    border-radius: 50% 45% 0 0;
}

.dog .ears::after {
    right: 0;
    border-radius: 45% 50% 0 0;
}

.dog .face {
    position: absolute;
    background: #F7AA2B;
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 0 0;
}

.dog .face::before,
.dog .face::after {
    content: "";
    display: block;
    margin: auto;
    background: #FEFEFE;
}

.dog .face::before {
    width: 15px;
    height: 35px;
    margin-top: 24px;
    border-radius: 20px 20px 0 0;
}

.dog .face::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    width: 60px;
    height: 65px;
    border-radius: 45% 45% 0 0;
}

.dog .eyes {
    position: relative;
    top: 29%;
    text-align: center;
}

.dog .eyes::before,
.dog .eyes::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 100%;
    background: #451D1C;
    margin: 0 14.5%;
}

.dog .teardrop {
    position: absolute;
    top: 125%;
    left: 19%;
    width: 6px;
    height: 6px;
    border-radius: 0 50% 50% 50%;
    transform: rotate(45deg);
    background: #FEFEFE;
    visibility: hidden;
}

.dog .nose {
    position: relative;
    top: 35%;
    width: 16px;
    height: 8px;
    border-radius: 35px 35px 65px 65px;
    background: #451D1C;
    margin: auto;
}

.dog .mouth {
    position: relative;
    top: 34.5%;
    width: 4px;
    height: 6px;
    margin: 0 auto;
    text-align: center;
    background: #451D1C;
}

.dog .mouth::before,
.dog .mouth::after {
    content: "";
    position: absolute;
    top: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 4px solid #451D1C;
    border-left-color: transparent;
    border-top-color: transparent;
    z-index: 2;
}

.dog .mouth::before {
    transform: translateX(-89%) rotate(45deg);
}

.dog .mouth::after {
    transform: translateX(-2px) rotate(45deg);
}

.dog .tongue {
    position: relative;
    z-index: 1;
}

.dog .tongue::before,
.dog .tongue::after {
    content: "";
    position: absolute;
}

.dog .tongue::before {
    top: 10px;
    left: -7px;
    width: 18px;
    height: 0;
    border-radius: 50%;
    background: #451D1C;
    z-index: -1;
}

.dog .tongue::after {
    top: 14px;
    left: -4px;
    width: 12px;
    height: 0;
    border-radius: 20px;
    background: #F5534F;
    z-index: 5;
}

.dog .chin {
    position: relative;
    top: 47.5%;
    margin: 0 auto;
    width: 12px;
    height: 12px;
    border-top: 10px solid #E8E7EC;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-radius: 2px;
    z-index: 0;
}

.dog .body {
    position: relative;
    height: 139px;
    margin: auto;
    z-index: 0;
}

.dog .body::before,
.dog .body::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    width: 100%;
    margin: auto;
    background: #F7AA2B;
}

.dog .body::after {
    top: -2px;
    bottom: -1px;
    width: 60px;
    background: #FEFEFE;
}

.dog .tail {
    position: absolute;
    left: -60%;
    bottom: 1px;
    background: #F7AA2B;
    width: 93px;
    height: 15px;
    transform: rotate(45deg);
    transform-origin: 100% 50%;
    border-radius: 25px 0 0 25px;
    z-index: -2;
    animation: movetail 0.1s linear infinite alternate forwards;
}

.dog .legs {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 15%;
    background: #F7AA2B;
    border-radius: 10px 10px 0 0;
}

.dog .legs::before,
.dog .legs::after {
    content: "";
    position: absolute;
    bottom: 1px;
    background: #CB7A1D;
    z-index: -1;
}

.dog .legs::before {
    left: -7.5%;
    width: 115%;
    height: 55%;
    border-radius: 5px 5px 0 0;
}

.dog .legs::after {
    left: -3.5%;
    width: 107%;
    height: 250%;
    border-radius: 20px 20px 35px 35px;
}

.like .dog .face::before {
    margin-top: 10px;
}

.like .dog .face::after {
    height: 85px;
}

.like .dog .eyes {
    top: 13%;
}

.like .dog .eyes::before,
.like .dog .eyes::after {
    width: 18px;
    height: 5px;
    margin: 0px 12.5%;
    transform: rotate(-37.5deg);
    border-radius: 20px;
}

.like .dog .eyes::after {
    transform: rotate(37.5deg);
}

.like .dog .nose {
    top: 18%;
}

.like .dog .mouth {
    top: 16.5%;
}

.like .dog .tongue::before {
    height: 12px;
}

.like .dog .tongue::after {
    height: 24px;
    animation: movetongue 0.1s linear 0.35s infinite alternate forwards;
}

.like .dog .chin {
    top: 34%;
}

.like .dog .tail {
    animation: movetail 0.1s linear infinite alternate forwards;
}

.dislike .dog .ears::before {
    transform: rotate(-50deg) translate(-7px, 2px);
}

.dislike .dog .ears::after {
    transform: rotate(50deg) translate(7px, 2px);
}

.dislike .dog .face::before {
    margin-top: 28px;
}

.dislike .dog .face::after {
    height: 55px;
}

.dislike .dog .eyes {
    top: 38%;
}

.dislike .dog .eyes::before,
.dislike .dog .eyes::after {
    width: 18px;
    height: 5px;
    margin: 0px 14.5%;
    transform: rotate(-37.5deg);
    border-radius: 20px;
}

.dislike .dog .eyes::after {
    transform: rotate(37.5deg);
}

.dislike .dog .teardrop {
    animation: cry 0.1s ease-in 0.25s forwards;
}

.dislike .dog .nose {
    top: 44%;
}

.dislike .dog .mouth {
    top: 42%;
}

.dislike .dog .chin {
    top: 52%;
}

.dislike .dog .tail {
    transform: rotate(0);
    animation: none;
}
  

@keyframes movetongue {
    100% {
        height: 27px;
    }
}

@keyframes movetail {
    0% {
        transform: rotate(37deg);
    }

    100% {
        transform: rotate(52deg);
    }
}

@keyframes cry {
    100% {
        visibility: visible;
    }
}