gpt4 book ai didi

html - Bootstrap 指标数字,改变颜色

转载 作者:行者123 更新时间:2023-11-28 01:45:16 25 4
gpt4 key购买 nike

我正在为学校做一个元素。我必须使用 Bootstrap 3 制作一个完全像这样的网站:image 1image 2 .

我几乎完成了该页面,但我卡住了。我想要指示器编号,就像我用黑色标记的图片一样。

我怎样才能创建这样的指标?

在网上搜索后,我得到了这样的信息:https://www.codeseek.co/danbhala/bootstrap-carousel-indicator-with-numbers-gpWvxG .问题是我无法在访问页面后将数字设为红色。

感谢您的帮助。

对于糟糕的图片和我的英语感到抱歉。如果有什么地方没有明确说明,请提出问题,我会回答。

*{
margin: 0;
}

html, body {
height: 100%;
background-color: rgb(228, 228, 228);
}

#content-container {
height: auto !important;
min-height: 100%;
margin: 0 auto;
}

.panel {
width: 99%;
margin-left: 0.4%;
box-shadow: 4px 4px 8px 0 rgba(0, 0, 0, 0.2),
0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

#footer {
min-height: 18%;
margin-top: 2%;
padding-top: 2%;
background-color: rgba(193, 188, 188, 0.55);
font-size: 12px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/SelectDate.css">
<title>Werken met Bootstrap</title>
</head>
<body>

<!-- Begin content-container -->
<div id="content-container">

<!-- Begin navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">

<div class="navbar-header">
<a class="navbar-brand" href="Index.html"><i class="fa fa-building-o" style="font-size:19px; color:red"> </i><b> Hotel</b> Booking</a>
</div>

<ul class="nav navbar-nav navbar-right">
<li><a href="Index.html">Home</a></li>
<li><a href="ExploreHotels.html">Explore Hotels</a></li>
<li><a href="ContactUs.html">Contact Us</a></li>
</ul>
</div>
</nav>
<!-- End navbar -->

<!-- Begin Container -->
<div class="container">
<h3><b>The Student Hotel The Hague</b></h3>
<br>
<div id="myCarousel" class="carousel slide" data-interval="false">

<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active">1</li>
<li data-target="#myCarousel" data-slide-to="1">2</li>
<li data-target="#myCarousel" data-slide-to="2">3</li>
</ol>

<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<div class="panel panel-defualt">
<div class="panel-body">
<p>Welcome! Let's book a room you'll love.<br>
Please provide us with the information started below, we will handle the data with care.
</p>
<hr>
<div class="row">
<div class="col-md-2" style="padding-top: 3%;">
<label class="radio-inline"><input type="radio" name="optradio">Mr</label>
<label class="radio-inline"><input type="radio" name="optradio">Mrs</label>
</div>
<div class="form-group col-md-5">
First name:
<input type="text" class="form-control" placeholder="Enter first name">
</div>
<div class="form-group col-md-5">
Last name:
<input type="text" class="form-control" placeholder="Enter last name">
</div>
</div>
<br>
<div class="row">
<div class="col-md-4">
Departure Date
<input type="text" class="form-control" placeholder="dd-mm-jjjj">
</div>
<div class="col-md-4">
Return Date
<input type="text" class="form-control" placeholder="dd-mm-jjjj">
</div>
<div class="col-md-4">
Rooms
<select class="form-control">
<option>1 Room</option>
<option>2 Room</option>
<option>3 Room</option>
<option>4 Room</option>
</select>
</div>
</div>
<hr>
<div class="pull-right">
<a href="#">Cancel &nbsp;&nbsp;</a><a href="#myCarousel" data-slide="next"><button type="button" class="btn btn-danger">Pick a room <b>&gt;</b></button>
</a>
</div>
</div>
</div>
</div>

<div class="item">
<img src="image/hotel.jpg">
</div>

<div class="item">
<img src="image/hotel2.jpg">
</div>
</div>

</div>
</div>
<!-- End Container -->
</div>
<!-- End content-contrainer -->

<!-- Begin Footer -->
<div id="footer">
<div class="container text-left">
<div class="row">

<!--First column-->
<div class="col-md-4">
<h6 class="mb-4 mt-3 font-weight-bold"><a href="Index.html"><i class="fa fa-building-o" style="font-size:14px;"><b> Hotel</b> Booking</i></a></h6>
<ul class="list-unstyled">
<li>
Niewmansstraat 123
</li>
<li>
1234 AB The Hague
</li>
<li>
The Netherlands
</li>
<li>
<br>
&copy; 2018 Hotel Booking
</li>
</ul>
</div>
<!--/.First column-->

<b>
<!--Second column-->
<div class="col-md-4">
<h5 class="mb-4 mt-3 font-weight-bold"><b>Useful links</b></h5>
<ul class="list-unstyled">
<li>
<a href="ExploreHotels.html">Explore hotels</a>
</li>
<li>
<a href="#!">Reviews</a>
</li>
<li>
<a href="#!">A link</a>
</li>
<li>
<a href="#!">Another link</a>
</li>
<li>
<a href="#!">Different link</a>
</li>
</ul>
</div>
<!--/.Second column-->

<!--Third column-->
<div class="col-md-4">
<h5 class="mb-4 mt-3 font-weight-bold"><b>The Company</b></h5>
<ul class="list-unstyled">
<li>
<a href="#!">About</a>
</li>
<li>
<a href="#!">Careers</a>
</li>
<li>
<a href="#!">Press centre</a>
</li>
<li>
<a href="#!">Terms & Conditions</a>
</li>
<li>
<a href="ContactUs.html">Contact us</a>
</li>
</ul>
</div>
<!--/.Third column-->
</b>

</div>
</div>
</div>
<!-- End Footer -->

</body>
</html>

最佳答案

CSS:

.carousel-indicators-numbers li {
text-indent: 0;
margin: 0 2px;
width: 30px;
height: 30px;
border: none;
border-radius: 100%;
line-height: 30px;
color: #fff;
background-color: #999;
transition: all 0.25s ease;
}
.carousel-indicators-numbers li.visited, .carousel-indicators-numbers li:hover, .carousel-indicators-numbers li.active {
margin: 0 2px;
width: 30px;
height: 30px;
background-color: red;
}

HTML:

<ol class="carousel-indicators carousel-indicators-numbers">
<li data-target="#myCarousel" data-slide-to="0" class="active">1</li>
<li data-target="#myCarousel" data-slide-to="1">2</li>
<li data-target="#myCarousel" data-slide-to="2">3</li>
</ol>

关于html - Bootstrap 指标数字,改变颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50215696/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com