<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <title>图片轮播+底部居中搜索框</title> <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"> <script src="//cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
<script src="/mobile/addon/jquery.mmenu.min.all.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<style type="text/css">
*{
margin:0px;
padding:0px; }
#carousel-example-generic{
width:680px;
height:480px; }
#search{
position:relative;
width:680px;   <!--可以设置为100%,以适应窗口变化,始终居中对齐-->
height:24px;
}
#search-wrap{
position:absolute;
margin-top:-10px; <!--达到覆盖图片轮播底部的作用--> 
left:50%;      <!--这部分是搜索框居中显示的关键。-->
margin-left:-130px;
width:260px;    
height:36px;    
border-radius:18px;
box-shadow: 0 0 3px rgba(0,0,0,.14);
background-color:#FFF; } #search-wrap .search-content{
box-shadow: none; border:0 none;
font-family: "Hiragino Sans GB","Microsoft YaHei","WenQuanYi Micro Hei",Arial,Helvetica,sans-serif;
margin-top:3px;
margin-left:18px;
width:190px;
height:30px;
}
#search-wrap .search-btn{
border:0px;
float:right;
margin:4px 4px 4px 0;
width:46px;
height:28px;
border-radius:14px;
background-color:#2980b9;
color:#FFF;
text-align:center;
line-height:28px; }
} </style>
</head> <body> <div class="content"> <!-- bootstrap 轮播-->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" 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>
</ol> <!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="/mobile/img/jordan1.png" alt="first"> <!--自行添加图片 -->
<div class="carousel-caption">
<h1> Micheal Jordan</h1>
</div>
</div>
<div class="item">
<img src="/mobile/img/jordan2.png" alt="second"> <!--自行添加图片 -->
<div class="carousel-caption">
<h1> Micheal Jordan</h1>
</div>
</div>
<div class="item">
<img src="/mobile/img/jordan3.png" alt="third"> <!--自行添加图片 -->
<div class="carousel-caption">
<h1>Micheal Jordan</h1>
</div>
</div>
</div> <!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div> <!-- 搜索框 -->
<div id="search">
<div id="search-wrap">
<input class="search-content" type="text" placeholder="输入搜索内容" name="word">
<button class="search-btn" type="submit">搜索</button>
</div>
</div> </div> <!-- content end -->
</body>
</html>

图片轮播(bootstrap)与 圆角搜索框(纯css)的更多相关文章

  1. 纯javaScript、jQuery实现个性化图片轮播

    纯javaScript实现个性化图片轮播 轮播原理说明<如上图所示>: 1. 画布部分(可视区域)属性说明:overflow:hidden使得超出画布部分隐藏或说不可见.position: ...

  2. 分享jquery实现百叶窗特效的图片轮播

    首先非常感谢网友嘉翼的无私分享,这是他刚在网站扣下来的特效,第一时间与大家分享,jquery实现百叶窗特效的图片轮播 使用方法: 1.引用css文件,css文件里面已经做了注释,基本只需要修改宽高就好 ...

  3. Jquery图片轮播和CSS图片轮播

    学习Jquery以后,很多时候觉得比写源生代码要简单一点.我们用JQuery做了一个图片轮播的动画,感觉比写CSS要简单一些.下面我来具体讲一下是怎么用JQuery来写. <body> & ...

  4. 纯js写图片轮播插件

    最近终于写成了自己创作的图片轮播插件,使用原生js编写.与目前网上流行的轮播插件相比,功能和效果稍弱,但是使用起来相当方便. 先看html代码 <!DOCTYPE html> <ht ...

  5. jQuery - 广告图片轮播切换

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  6. 利用bootstrap写图片轮播

    利用bootstrap写图片轮播 缺点是轮播没有固定样式图片样式会改变外框的大小,所以要再设置 以及左右按钮的style也要从新设置 <div class="carousel slid ...

  7. 基于bootstrap的图片轮播效果展示

    <!DOCTYPE html><html lang="zh-CN"> <head> <meta charset="utf-8&q ...

  8. bootstrap 图片轮播效果

    <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="http: ...

  9. 全面解析Bootstrap图片轮播效果

    http://www.jb51.net/article/75806.htm 一 . 结构分析 一个轮播图片主要包括三个部分: ☑ 轮播的图片 ☑ 轮播图片的计数器 ☑ 轮播图片的控制器 第一步:设计轮 ...

随机推荐

  1. QT 做软件盘

    最近搞了一个组织细胞脱水机项目,当然,对于国内的项目都是仿来仿去的,我们也不例外,开启被仿机器后,第一个看到的界面就是用户登录界面,需要输入中文,作为一个程序员,我的第一反应就是我需要采用什么用的框架 ...

  2. SqlServer索引使用及维护

    在应用系统中,尤其在联机事物处理系统中,对数据查询及处理速度已成为衡量应用系统的标准. 而采用索引来加快数据处理速度也成为广大数据库用户所接受的优化方法. 在良好的数据库设计基础上,能够有效地索引是S ...

  3. Cookie与Session用法

    以下是Cookie的完整实例 MyEclipse新建web Project工程,建两个jsp文件,如下 1.login.jsp <%@ page language="java" ...

  4. 移动端flex布局 微信和UC的兼容性

    请查看以下两个链接 http://www.tuicool.com/articles/Afq6Bzq http://www.sheng00.com/2148.html

  5. activeMq 消费者整合spring

    package com.mq.consumer; import javax.jms.JMSException;import javax.jms.Message;import javax.jms.Mes ...

  6. Ubuntu 使用Gparted工具扩大第一分区方法步骤

    Ubuntu 使用Gparted工具扩大第一分区方法步骤 环境:vmware9.01 .ubuntu12.04 需要的工具: 1.U盘,Universal-USB-Installer-1.9.6.4. ...

  7. 第一次用golang写个小程序

    1.下载go1.6并安装.我是win7系统(会自动添加GOOROOT环境变,自己建一个放go文件的工程目录并添加到环境变量中) 2.下载liteide并解压缩.(liteide查看菜单中也可编辑环境变 ...

  8. 人工智能交互集成在线语音合成能力的Tips

    在线语音合成就是在联网的场景下将文字转换成声音,实现机器向人的声音交互.这个概念应该是比较好理解的,下面就结合官网的Android在线合成的Demo讲解一下合成的流程以及大家经常遇到的一些问题. 到官 ...

  9. CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3

    http://www.osyunwei.com/archives/8867.html 一.配置防火墙,开启80端口.3306端口 vi /etc/sysconfig/iptables #编辑防火墙配置 ...

  10. ICEM相关

    1,几何体建模不用讲(可以不学,因为通常是其他软件导入)在初始分块前,建立part,为建立边界条件使用(这是部分的定义最重要的作用,所以你可以按照不同的情况来定义,划分网格只是块的工作),所以对于三维 ...