开发者学堂课程【移动 Web 前端开发:轮播图-移动端】学习笔记,与课程紧密联系,让用户快速学习知识。
课程地址:https://developer.aliyun.com/learning/course/594/detail/8458
轮播图-移动端
目录:
一、 轮播图-移动端结构
二、 实际效果
一、轮播图-移动端结构<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=e">
<title>container</title>
<link href=" ../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<! --[if lt IE 9]>
<script src="../lib/htm15shiv/htm15shiv.min.js"></script>
<script src="../lib/respond/respond.min.js"></script>
< ! [ endif]-->
</head>
<body>
<div id="carousel-example-generic" class=" carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="e" 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>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
</ol>
<style>
/*在页面当中的任何地方都可以*/
.
m_imageBox{
Display:block;
Width:100%;
}
.
m_imageBox img{
Width:100%
Display:block;
}
</style>
<div class="carousel-inner" >
<div class="item active">
<a class=”m_imageBox” href="#"><img src="../images/slide_01_640x340.jpg" alt=""/></a>
</div>
<div class="item">
<a class=”m_imageBox” href="#"><img src=" ../images/slide_02_640x340.jpg" alt=""/></a>
</div>
<div class="item">
<a class=”m_imageBox” href="#"><img src="../images/slide_03_640x340.jpg" alt=""/></a>
</div>
<div class="item">
<a class=”m_imageBox” href="#"><img src=" ../images/slide_04_640x340.jpg" alt=""/></a>
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"">
<span class="glyphicon glyphicon-chevron-left" ></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
二、实际效果
下图为实际效果图