웹페이지 기능 하나만 도와주실분.(HTML,CSS,JS
-
게시물 수정 , 삭제는 로그인 필요
웹페이지 기능 하나만 도와주실분.(HTML,CSS,JS) 써서요ㅠㅠ 학원에서 배우고있는데 잘모르겠어요..
일단 첫번째로 올린 이미지는 지금까지 한거 입니다
기능 하나만 더 추가하면 페이지완성인데 어떻게하는지 모르겠어요...
설명하자면
2번째 이미지처럼 좌,우에 세모 버튼을 클릭시
이미지가 하나씩 다른이미지로 이동하는걸 구현하고싶은데
어떻게하는지 모르겠어요.. 하나만 구현하면 완성인데ㅠㅠ
일단 코드 알려드릴게요..
css, html 코드 적어둘테니 기능 하나만 더 추가해서 코드작성해서 답변 부탁드립니다 ..
학원에서두 배우는데 어렵네여 ㅠㅠ
코드는 위는 html
아래는 css 코드 입니다..
html
<div><pre><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HairRok</title>
<link rel="stylesheet" type="text/css" href="../css/Face_An_OK.css">
<script src="../js/Include.js"></script>
</head>
<body style="background-color: #EFE5FC;">
<div id="navbar"></div>
<!-- Main content area -->
<div style="text-align: center;">
<h1 style="font-family: 'GmarketSans';">당신의 얼굴은 ○○○ 얼굴형 입니다.</h1>
<h2 style="font-family: 'GmarketSans';">추천 헤어 스타일</h2>
<div id="faceShapes">
<!-- Face shape example 1 -->
<div class="faceShape">
<img src="../img/basic_profile.png" class="card-img-top" alt="계란형 얼굴형">
<p>#컷</p>
</div>
<!-- Face shape example 2 -->
<div class="faceShape">
<img src="../img/basic_profile.png" class="card-img-top" alt="하트형 얼굴형">
<p>#펌</p>
</div>
<!-- Face shape example 3 -->
<div class="faceShape">
<img src="../img/basic_profile.png" class="card-img-top" alt="각진 얼굴형">
<p>#컷</p>
</div>
</div>
</div>
<!-- Button Container -->
<div class="button-container">
<button type="button" class="btn" onclick="redirectToDesigner()">추천디자이너보러가기</button>
</div>
<div id="footer"></div>
<script>
function redirectToDesigner() {
window.location.href = 'your_destination_page.html';
}
</script>
</body>
</html>
css
<div><pre>body {
background-color: #EFE5FC; /* 전체 배경색 설정 */
font-family: 'GmarketSans'; /* 폰트 적용 */
}
h1, h2 {
font-family: 'GmarketSans'; /* 폰트 적용 */
}
#faceShapes {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3개의 칼럼으로 구성 */
gap: 20px; /* 그리드 항목 사이의 간격 */
justify-content: center; /* 가로 중앙 정렬 */
align-items: center; /* 세로 중앙 정렬 */
padding: 20px; /* 그리드 주변 여백 */
max-width: 1400px; /* 그리드 컨테이너의 최대 너비를 늘림 */
margin: auto; /* 페이지 중앙에 그리드 컨테이너 배치 */
}
.faceShape {
background-color: #fff; /* 그리드 항목 배경색을 흰색으로 설정 */
border: 1px solid #ccc; /* 테두리 */
border-radius: 10px; /* 모서리 둥글게 */
padding: 20px; /* 내부 여백 */
width: 400px; /* 너비를 늘림 */
height: 450px; /* 높이를 늘림 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 그림자 효과 */
display: flex; /* 플렉스박스 레이아웃 사용 */
justify-content: center; /* 가로 방향으로 중앙 정렬 */
align-items: center; /* 세로 방향으로 중앙 정렬 */
flex-direction: column; /* 항목들을 세로로 쌓음 */
}
.faceShape img {
width: auto; /* 이미지의 너비 자동 조절 */
max-width: 100%; /* 최대 너비를 그리드 항목에 맞춤 */
height: auto; /* 이미지의 높이를 자동으로 조절 */
display: block; /* 이미지를 블록 레벨 요소로 만들어줌 */
margin: auto; /* 이미지를 수직으로 중앙에 배치 */
}
.moreInfoButton {
background-color: #E2FFF8;
display: block;
margin: 20px auto;
padding: 15px 30px;
width: 300px;
height: 60px;
font-family: 'GmarketSans'; /* 버튼에 폰트 적용 */
font-size: 18px; /* 글자 크기를 늘림 */
}
.button-container {
display: flex;
justify-content: center;
align-items: center;
height: 100px; /* Adjust the height as needed */
}
.btn {
background-color: #E2FFF8;
border: 1px solid #000;
color: #000;
padding: 20px 30px;
font-size: 1.1rem;
font-weight: bold;
border-radius: 0;
width: 18%;
}
<div><pre><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HairRok</title>
<link rel="stylesheet" type="text/css" href="../css/Face_An_OK.css">
<script src="../js/Include.js"></script>
</head>
<body style="background-color: #EFE5FC;">
<div id="navbar"></div>
<!-- Main content area -->
<div style="text-align: center;">
<h1 style="font-family: 'GmarketSans';">당신의 얼굴은 ○○○ 얼굴형 입니다.</h1>
<h2 style="font-family: 'GmarketSans';">추천 헤어 스타일</h2>
<div id="faceShapes">
<!-- Face shape example 1 -->
<div class="faceShape">
<img src="../img/basic_profile.png" class="card-img-top" alt="계란형 얼굴형">
<p>#컷</p>
</div>
<!-- Face shape example 2 -->
<div class="faceShape">
<img src="../img/basic_profile.png" class="card-img-top" alt="하트형 얼굴형">
<p>#펌</p>
</div>
<!-- Face shape example 3 -->
<div class="faceShape">
<img src="../img/basic_profile.png" class="card-img-top" alt="각진 얼굴형">
<p>#컷</p>
</div>
</div>
</div>
<!-- Button Container -->
<div class="button-container">
<button type="button" class="btn" onclick="redirectToDesigner()">추천디자이너보러가기</button>
</div>
<div id="footer"></div>
<script>
function redirectToDesigner() {
window.location.href = 'your_destination_page.html';
}
</script>
</body>
</html>
css
<div><pre>body {
background-color: #EFE5FC; /* 전체 배경색 설정 */
font-family: 'GmarketSans'; /* 폰트 적용 */
}
h1, h2 {
font-family: 'GmarketSans'; /* 폰트 적용 */
}
#faceShapes {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3개의 칼럼으로 구성 */
gap: 20px; /* 그리드 항목 사이의 간격 */
justify-content: center; /* 가로 중앙 정렬 */
align-items: center; /* 세로 중앙 정렬 */
padding: 20px; /* 그리드 주변 여백 */
max-width: 1400px; /* 그리드 컨테이너의 최대 너비를 늘림 */
margin: auto; /* 페이지 중앙에 그리드 컨테이너 배치 */
}
.faceShape {
background-color: #fff; /* 그리드 항목 배경색을 흰색으로 설정 */
border: 1px solid #ccc; /* 테두리 */
border-radius: 10px; /* 모서리 둥글게 */
padding: 20px; /* 내부 여백 */
width: 400px; /* 너비를 늘림 */
height: 450px; /* 높이를 늘림 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 그림자 효과 */
display: flex; /* 플렉스박스 레이아웃 사용 */
justify-content: center; /* 가로 방향으로 중앙 정렬 */
align-items: center; /* 세로 방향으로 중앙 정렬 */
flex-direction: column; /* 항목들을 세로로 쌓음 */
}
.faceShape img {
width: auto; /* 이미지의 너비 자동 조절 */
max-width: 100%; /* 최대 너비를 그리드 항목에 맞춤 */
height: auto; /* 이미지의 높이를 자동으로 조절 */
display: block; /* 이미지를 블록 레벨 요소로 만들어줌 */
margin: auto; /* 이미지를 수직으로 중앙에 배치 */
}
.moreInfoButton {
background-color: #E2FFF8;
display: block;
margin: 20px auto;
padding: 15px 30px;
width: 300px;
height: 60px;
font-family: 'GmarketSans'; /* 버튼에 폰트 적용 */
font-size: 18px; /* 글자 크기를 늘림 */
}
.button-container {
display: flex;
justify-content: center;
align-items: center;
height: 100px; /* Adjust the height as needed */
}
.btn {
background-color: #E2FFF8;
border: 1px solid #000;
color: #000;
padding: 20px 30px;
font-size: 1.1rem;
font-weight: bold;
border-radius: 0;
width: 18%;
}
#웹페이지 기능 #웹페이지 기능정의서 #웹페이지 기능 구현 #웹페이지 검색 기능 구현 #웹페이지 미리보기 기능 #웹페이지 알림 기능 #웹페이지 돋보기 기능 #웹페이지 로그인 기능 #웹페이지 번역 기능 #웹페이지 캡쳐 기능