반응형
<!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>캐러셀, 인디케이터</title>
<!-- 합쳐지고 최소화된 최신 CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<!-- 부가적인 테마 -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<style>
.control{
position: absolute;
top: 50%;
display: inline-block;
}
</style>
</head>
<body>
<div class="container">
<div id="carousel-example-generic" class="carousel slide">
<!-- 인디케이터 -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- 이미지 추가 부분 -->
<div class="carousel-inner">
<div class="item active">
<img src="img/one.jpg">
</div>
<div class="item">
<img src="img/two.jpg">
</div>
<div class="item">
<img src="img/three.jpg">
</div>
</div>
<!-- 방향키
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="icon-prev"></span>/
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="icon-next"></span>
</a>-->
<!-- 방향키 이미지로 변경 -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<img src="img/KakaoTalk_20221108_173039632.png" class="control">
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<img src="img/KakaoTalk_20221108_173039632_01.png" class="control">
</a>
</div>
</div>
<!-- jQuery (부트스트랩의 자바스크립트 플러그인을 위해 필요합니다) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- 합쳐지고 최소화된 최신 자바스크립트 -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script>
$('.carousel').carousel();
</script>
</body>
</html>
반응형
'html, css, bootstrap' 카테고리의 다른 글
bootstrap_thumbnail (0) | 2022.11.08 |
---|---|
bootstrap_navigationbar (0) | 2022.11.08 |
bootstrap_모달창 (0) | 2022.11.08 |
bootstrap_dropdown (0) | 2022.11.08 |
bootstrap_Glyphicon (0) | 2022.11.08 |