본문 바로가기
중앙정보처리학원/FRONTEND

프론트앤드 마지막 TEST

by 하지마지 2023. 9. 26.
728x90
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>중간 test 1</title>
    <link rel="stylesheet" href="css/sample.css">
    <link rel="stylesheet" href="css/comm.css">

   

    <script src="javascript/sample.js"></script>
</head>
   
<body>
    <header>
        <div>아메리카노</div>
        <div>카푸치노</div>
        <div>밀크커피</div>
        <div>딸기커피</div>
        <div>블랙커피</div>
    </header>

</body>


</html>
* {
    margin: 0; padding: 0;
    box-sizing: border-box;
    list-style: none;

    color: black;
    text-decoration: none;
    font-family: "y";
}
@font-face{
    font-family: "y";
    src: url(../fonts/CJU-Medium.ttf);
}
header {
    width: 80%; height: 300px;
    border: 0px solid black;
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}
header div {
    border: 1px solid green;
    border-radius: 20px;
    background-color: beige;
    width: 100px; height: 50px;
    margin-left: 10%;
    text-align: center;
    line-height: 50px;

}
header div:hover{
    background: black;
    color: white;
   
}


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>중간 test 1</title>
    <link rel="stylesheet" href="css/test2.css">
    <!-- <script src="javascript/sample.js"></script> -->
</head>

<body>
    <ul>
        <li><img src="img/ill (1).png" alt=""></li>
        <li><img src="img/ill (3).jpg" alt=""></li>
        <li><img src="img/ill (2).jpg" alt=""></li>
    </ul>

</body>


</html>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;

    color: black;
    text-decoration: none;
    font-family: "y";
}

@font-face {
    font-family: "y";
    src: url(../fonts/CJU-Medium.ttf);
}

ul {
    width: 80%;
    height: 300px;
    border: 0px solid black;
    display: flex;
    justify-content: space-between;
    margin: 20px auto;
}

ul li {
    width: 300px;
    height: 150px;
    border: 1px solid black;
    overflow: hidden;
   
}

li img {
    width: 100%;
    height: 100%;
    transition: 1.2s;
   
}

li img:hover {
    transform: scale(1.2);
}


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>중간 test 3</title>
    <link rel="stylesheet" href="css/test3.css">
    <script src="javascript/test3.js"></script>
</head>

<body>
    <nav>
        <ul>
            <li class="btn1"><button>아메리카노</button></li>
            <li class="btn2"><button>카푸치노</button></li>
            <li class="btn3"><button>카페라떼</button></li>
        </ul>
        <div class="text">
            설명이 보이는 박스
        </div>
    </nav>

</body>


</html>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    font-family: "y";
}

@font-face {
    font-family: "y";
    src: url(../fonts/CJU-Medium.ttf);
}

nav {
    width: 80%;
    border: 0px solid black;
    margin: 10px auto;

}

nav ul {
    width: 100%;
    text-align: center;
    border: 0px solid black;
    display: flex;
    justify-content: left;
   
   
}

ul li button {
    width: 100px;
    height: 50px;
    margin-left: 50px;
    background-color: bisque;
    border-radius: 10px;
}

ul li button:hover{
    color: white;
    background-color: black;
   
}
nav div{
    width: 100%; height: 150px;
    border: 0px solid black;
    border-radius: 20px;
    margin: 10px auto;
    text-align: left;
    text-indent: 30px;
    line-height: 150px;
    background-color:darkcyan ;
    color: wheat;
}


window.onload = function () {

    let text="", btn1, btn2, btn3;
    text = document.querySelector(".text");

    btn1 = document.querySelector(".btn1");
    btn2 = document.querySelector(".btn2");
    btn3 = document.querySelector(".btn3");

    btn1.addEventListener("click", function () {
        text.innerHTML = "아메리카노는 디폴트.";
    });

    btn2.addEventListener("click", function(){
        text.innerHTML = "카푸치노는 거품키스";
       
    });
    btn3.addEventListener("click", function(){
        text.innerHTML = "카페라떼는 아트!";
       
    });

}

test1.txt
0.00MB
test2.txt
0.00MB
test3.txt
0.00MB

728x90

'중앙정보처리학원 > FRONTEND' 카테고리의 다른 글

HTML5 & CSS3  (1) 2023.10.09
자바스크립트 (3)  (0) 2023.09.26
자바스크립트 (2)  (0) 2023.09.25
자바스크립트 (1)  (0) 2023.09.22
HTML5 & CSS (4)  (0) 2023.09.21