• 카테고리

    질문 & 답변
  • 세부 분야

    웹 개발

  • 해결 여부

    미해결

움직이는 캐릭터 예제로 클릭 이벤트 익혀보기-

19.08.07 21:47 작성 조회수 275

0

단순한 예제인데도 오류를 못찾겠습니다.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Interactive Web</title>
<link rel="stylesheet" href="02_02.css">
</head>
<body>
<div class="stage">
<div class="ilbuni"></div>
<div class="ilbuni"></div>
<div class="ilbuni"></div>
</div>
</body>
</html>

02_02.css
.stage {
position: relative;
width: 100vw;
height: 75vw;
background: #fff000;
}
.libuni {
position: absolute;
width: 100px;
height: 100px;
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: contain;
}
.ilbuni:nth-of-type(1) {
left: 5%;
bottom: 5%;
background-image:url('ilbuni_0.png');
}
.ilbuni:nth-of-type(2) {
left: 10%;
bottom: 3%;
background-image:url('ilbuni_1.png');
}
.ilbuni:nth-of-type(3) {
left: 7%;
bottom: 10%;
background-image:url('ilbuni_2.png');
}
같은 공간에 웹파일과 이미지 같이 넣었습니다.
도와주세요 ㅠ

답변 3

·

답변을 작성해보세요.

1

앗 제가 답변을 못단 사이에^^;; 감사합니다 악어님!

1

김악어님의 프로필

김악어

2019.08.08

안녕하세요.

시간이 많이 지나서 문제 해결하셨을것 같지만.... 클래스 명이 달라서 나오지 않는것 같아요.

libuni 를 ilbuni 로 수정해주세요.

아래와 같이 클래스명이 다릅니다.

.libuni {}

.ilbuni:nth-of-type(1) {}

0

정원준님의 프로필

정원준

질문자

2019.08.08

감사합니다. ㅠㅠㅠ