728x90
반응형
.carousel slide
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.js"></script> <style> .carousel-inner img{ width: 100%; height: 100%; } </style> </head> <body> <div id="demo" class="carousel slide" data-ride="carousel"> <ul class="carousel-indicators"> <li data-target="#demo" data-slide-to="0" class="active"></li> <li data-target="#demo" data-slide-to="1"></li> <li data-target="#demo" data-slide-to="2"></li> </ul> <div class="carousel-inner"> <div class="carousel-item active"> <img src="./img/la.jpg" alt="Los Angeles" width="1100" height="500"> <div class="carousel-caption"> <h3>Los Angeles</h3> <p>We had such a great time im LA!</p> </div> </div> <div class="carousel-item"> <img src="./img/chicago.jpg" alt="Chicago" width="1100" height="500"> <div class="carousel-caption"> <h3>Chicago</h3> <p>Thank you, Chicago</p> </div> </div> <div class="carousel-item"> <img src="./img/ny.jpg" alt="New York" width="1100" height="500"> <div class="carousel-caption"> <h3>New York</h3> <p>We lov the Big Apple!</p> </div> </div> </div> <a class="carousel-control-prev" href="#demo" data-slide="prev"> <span class="carousel-control-prev-icon"></span> </a> <a class="carousel-control-next" href="#demo" data-slide="next"> <span class="carousel-control-next-icon"></span> </a> </div> </body> </html>
icon
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"> </head> <body> <div class="container"> <h1>My Icons <i class="fa fa-star"></i></h1> <p>아이콘: <i class="fa fa-thumbs-up"></i></p> </div> <div class="container"> <p>Others:</p> <i class="fa fa-cloud"></i> <i class="fa fa-coffee"></i> <i class="fa fa-car"></i> <i class="fa fa-file"></i> <i class="fa fa-bars"></i> <i class="fa fa-bookmark"></i> <i class="fa fa-heart"></i> <!-- https://www.w3schools.com/icons/icons_reference.asp --> </div> </body> </html>
728x90
반응형
'[JS]' 카테고리의 다른 글
[Bootstrap] modal (0) | 2024.03.12 |
---|---|
[Bootstrap] navbar (0) | 2024.03.12 |
[Bootstrap] form validation (0) | 2024.03.11 |
[Bootstrap] grid, button (0) | 2024.03.11 |
[Bootstrap] container, col (0) | 2024.03.11 |