导航栏和内容div之间有一个神秘的空间(大约25px).我使用Chrome和1600x900屏幕分辨率.我已经用完全相同的问题查看了其他问题,并且我应用了给出的答案,但问题仍然存在.我已将导航栏的边距底部设置为0并覆盖Bootstrap 3.1.1. HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Title</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/hover.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/lib/modernizr-2.6.2-respond-1.1.0.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a href="#"><img src="img/title.png"></img></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="content"></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
CSS
body {
padding: 70px 0 …
Run Code Online (Sandbox Code Playgroud) 我在这个网站上看到了这个进度条形码.
我想要做的是,有一个3分钟的倒计时,并显示剩下多少分钟和秒.所以,而不是显示百分比,我想显示剩余时间.
我使用以下代码:
JS
progress(100, $('#progressBar')); // This is what the timer should update each second
function progress(percent, $element) {
var progressBarWidth = percent * $element.width() / 100;
$element.find('div').animate({ width: progressBarWidth }, 500).html(percent + " minutes/seconds to go");
};
Run Code Online (Sandbox Code Playgroud)
HTML
<div id="progressBar">
<div></div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
#progressBar {
width: 923px;
margin: 10px auto;
height: 22px;
background-color: #0A5F44;
}
#progressBar div {
height: 100%;
text-align: right;
padding: 0 10px;
line-height: 22px; /* same as #progressBar height if we want text …
Run Code Online (Sandbox Code Playgroud) <!DOCTYPE html>
<html lang="en">
<head>
<title>Trello Inspired</title>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="../css/plugins/bootstrap-tour.min.css">
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8" />
</head>
<body>
<div class="left-container">
<span class="logo"><h2>Title 2</h2></span>
<p class="left-msg welcom-msg">Now that registration and filling out forms is out the way, let's get you all set up.</p>
<p class="left-msg need-enrol">First you'll need to enrol to an exam.</p>
</div>
<div class="right-container">
<button class="btn btn-default enrol-btn" id="enrol-btn1" data-toggle="popover" data-placement="left">Enrol</button>
<button class="btn btn-default start-exam-btn" style="display:none;">Preparation</button>
</div>
</body>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="../js/libs/bootstrap.min.js"></script>
<script src="../js/plugins/bootstrap-tour.min.js"></script> …
Run Code Online (Sandbox Code Playgroud)