Pre-Preparation:
1.jquery.js.
2.bootstrap of Carousel.js.
3.bootstrap.css.
Let's look at the code together:
The page is ugly, I hope you don't mind oh hee
Effect Chart:
HTML+JS:
Index.css
Container-fluid {padding-left:200px;}. Navbar-default {background-color: #308dca;}
. navbar-brand {font-size:34px;
height:70px; }. Navbar-nav>li>a {font-size:19px}. navbar-default. Navbar-brand,. Navbar-default. Navbar-nav>li>a,. na Vbar-default navbar-nav>li>a:hover,. Navbar-default. Navbar-nav>li>a:focus {color: #fff;} navbar-brand ,. navbar-nav>li>a {line-height:40px}. navbar-default. navbar-nav>.active>a,. Navbar-default.
Navbar-nav>.active>a:hover, Navbar-default. Navbar-nav>.active>a:focus {color: #fff;
Background-color: #2276bf; }. index-body {margin:0 auto; carousel-inner {height:490px;}. Index-body,. Images {width:900px}. index-foot
er {margin-top:20px;
Color: #fff;
Background-color: #2276bf;
}. footer-centent {width:300px;
font-size:20px;
line-height:55px;
margin:0 Auto;
height:60px; }
Everyone in their own design demo time, note that class for Index-body div and the width of the IMG to set the same, otherwise there will be the following:
The above is a small series to introduce the use of bootstrap carousel.js to achieve the animation effect of the carousel, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!