最近一直在写页面,上周真的是写完一个又一个的页面。通过写这些页面,也是接触到了BootStrap中很多的常用插件,类似我们之前所说的控件。下面就来看看BootStrap中会给我们带来哪些眼前一亮的插件。
   本篇博客将介绍下拉菜单、列表、单选按钮、tab切换和tiles案例(win8页面)五种。
  【具体介绍】
************************** BootStrap下拉菜单(Dropdowns)***************************
  •  Usage
        Make sure jQuery.js,bootstrap.js and bootstrap.css is loaded.
<div class="dropdown"><a id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html">下拉菜单(Dropdown) <span class="caret"></span></a><ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">...</ul>
</div>
  •  My practice
                                              
  •  Code
HTML:
<!-- 下拉菜单的实现 -->
<div class="dropdown"><ul class="dLabel luxury" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img class="imgversion" src="../style/images/icon-豪华版_11.png"/><div class="version luxury">豪华版</div><div class="fontcharacter">︾</div></ul><ul class="dropdown-menu ultimate"><li><img class="imgversion dropdownlist-two" src="../style/images/icon-豪华版_11.png"/></li><li class="version luxury ultimate">旗舰版</li></ul><ul class="dropdown-menu standard"><li><img class="imgversion dropdownlist-two" src="../style/images/icon-豪华版_11.png"/></li><li class="version luxury standard">标准版</li></ul></div>
Less:
@margin-left-body: 16px;
@menu: 140px;
.dropdown {    /* 下拉菜单尺寸设置 */width: @margin-left-body + @menu;height: @menu;&.open {    /* 下拉菜单展开尺寸设置 */width: @margin-left-body + @menu;height: @menu;}ul.dropdown-menu {  /* 下拉菜单背景颜色,位置设置 */margin-left: @margin-left-body;background-color: #508cf9;height: @menu;&.ultimate {   /* 下拉菜单展开背景颜色,位置设置 */width: @menu;margin-top: 0px;background-color: #85aefb;}&.standard {width: @menu;margin-top: 138px;background-color: #96b9fb;}}.dLabel {&.luxury {  /* 豪华版菜单样式设置 */height: @menu;width: @menu + @margin-left-body;margin-left: @margin-left-body;background-color: #508cf9;padding-left: 0px;}}.imgversion {  /* 菜单中各个版本图片位置设置 */margin-top: 14px;margin-left: 50px;&.dropdownlist-one {margin-left: 45px;margin-top: 14px;}&.dropdownlist-two {margin-left: 45px;margin-top: 14px;}}.fontcharacter {  /* 首菜单下拉标识尺寸位置设置 */margin-left: 70px;margin-top: -20px;width: 40px;}.version {   /* 菜单中版本信息字体设置 */font-size: 30px;&.luxury {width: 100px;height: 50px;margin-left: 35px;margin-top: 6px;&.ultimate {margin-top: -65px;}&.standard {margin-top: -65px;}}}
}
************************** BootStrap列表(List)***************************
  •  Usage
        Make sure jQuery.js,bootstrap.js and bootstrap.css is loaded.
<ul class="list-group"><li class="list-group-item">One</li><li class="list-group-item">Two</li><li class="list-group-item">Three</li>
</ul>
  •  My practice
                 
  •  Code
HTML:
<div class="personaltext-content colorset"><span class="perfect-circle"></span><div class="colortag">玫瑰金</div></div><div class="personaltext-fontset">颜色:</div><div class="line"></div><ul class="list-group-color"><li class="list-group-item colorone" οnclick="listcolorHide()"><span class="circle gold"></span> 玫瑰金</li><li class="list-group-item colortwo" οnclick="listcolorHide()"><span class="circle pink"></span> 浅粉红</li><li class="list-group-item colorthree" οnclick="listcolorHide()"><span class="circle purple"></span> 紫罗兰</li></ul>
Less:
@listtwo-margin-top: 100px;
@listthree-margin-top: 200px;
ul {&.list-group-fontfamily {margin-bottom: 0px;display: none;}li.list-group-item {z-index: 4;position: absolute;width: 80%;height: 100px;margin-left: 60px;padding-left: 60px;padding-right: 15px;padding-top: 30px;&.fontone {color: #e70116;}&.fonttwo {margin-top: @listtwo-margin-top;}&.fontthree {margin-top: @listthree-margin-top;}
}
************************** BootStrap单选按钮(Radio)***************************
  • Usage
        Make sure jQuery.js,bootstrap.js and bootstrap.css is loaded.

<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked> 选项 1
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
选项 2 - 选择它将会取消选择选项 1
</label>
</div>
  • My practice
     
  •  Code
HTML:

 <div class="personaltext-fontset">位置:</div><div class="position"><span class="textpostion">lenovo</span><input type="radio" class="radio righttop" name="radioposition"><input type="radio" class="radio middle" name="radioposition"><input type="radio" class="radio leftbottom" name="radioposition"><input type="radio" class="radio rightbottom" name="radioposition"></div>
Less:
 .position {width: 310px;height: 210px;background-color: #B5B5B5;-moz-border-radius: @radius; /* Gecko browsers */-webkit-border-radius: @radius; /* Webkit browsers */border-radius: @radius; /* W3C syntax */.textpostion {color: #FFFFFF;margin-left: 25px;}.radio {width: 40px;height: 40px;float: right;position: relative;margin-top: 30px;margin-right: 45px;background-color: #FFFFFF;&.middle {margin-right: 60px;margin-top: 85px;}&.leftbottom {float: left;margin-left: 45px;margin-top: 115px;margin-right: 40px;}&.rightbottom {margin-left: 0px;margin-top: 30px;margin-bottom: 0px;margin-right: 45px;}}}
************************** BootStrap标签页(Tab)***************************
  • Usage
        Make sure jQuery.js,bootstrap.js and bootstrap.css is loaded.

<div class="tab-content"><div class="tab-pane fade in active" id="home">...</div><div class="tab-pane fade" id="svn">...</div><div class="tab-pane fade" id="ios">...</div><div class="tab-pane fade" id="java">...</div>
</div>

  • My practice
         
<ul class="nav nav-tabs configTab"><li class="myConfig"><a href="#add0" data-toggle="tab"><img class="myConfigIcon" src="../style/images/icon-我的配置.png" alt="我的配置"/><div>我的配置</div></a></li></ul><ul class="nav nav-tabs configTab innerUl"><li class="innerTab"><a href="#personalpicture" data-toggle="tab"><img class="myConfigIcon" src="../style/images/icon-个性化图片.png" alt="个性化图片"/><div>个性化图片</div></a></li><li class="innerTab"><a href="#personaltext" data-toggle="tab"><img class="myConfigIcon" src="../style/images/icon-个性化文字.png" alt="个性化文字"/><div>个性化文字</div></a></li><li class="innerTab"><a href="#laser" data-toggle="tab"><img class="myConfigIcon" src="../style/images/icon-镭雕工艺.png" alt="镭雕工艺"/><div>镭雕工艺</div></a></li><li class="innerTab"><a href="#add1" data-toggle="tab"><img class="myConfigIcon" src="../style/images/icon-内存.png" alt="内存"/><div>内存</div></a></li><li class="innerTab"><a href="#add1" data-toggle="tab"><img class="myConfigIcon" src="../style/images/icon-硬盘.png" alt="硬盘"/><div>硬盘</div></a></li>
</ul>
Less:

  ul {float: left;border: none;}.configTab {.myConfig {width: 140px;height: 100%;background-color: #508cF9;border-radius: 25px 25px 0 0;margin: 0 20px 0 0;box-shadow: 1px 1px 6px 1px rgba(90, 90, 90, 0.5);a {margin: 0;padding: 0;border: none;.myConfigIcon {position: relative;top: 16px;}div {margin-right: 0;margin-top: 24px;border: none;padding: 0;color: #fff;font-size: 20px;white-space: nowrap;}}}li.active {border-bottom: none;background-color: #518bf9;border-radius: 25px 25px 0 0;a {border-bottom: none;background-color: #518bf9;border-radius: 25px 25px 0 0;}}}.innerUl {float: left;.innerTab {width: 105px;height: 100%;margin-right: 43px;border-bottom: none;a {padding: 0;.myConfigIcon {position: relative;top: 16px;}div {margin-right: 0;margin-top: 24px;border: none;padding: 0;color: #949494;font-size: 20px;white-space: nowrap;}}}li.active {border: 1px solid #518bf9;border-bottom: none;background-color: #eef2f5;border-radius: 20px 20px 0 0;a {border: 1px solid #518bf9;border-bottom: none;background-color: #eef2f5;border-radius: 20px 20px 0 0;}}
}
其实,这是我看见的一个案例,BootStrap如何实现win8开始页面。链接地址

************************** BootStrap Metro UI CSS ***************************

  • Usage
        Make sure jQuery.js,bootstrap.js and bootstrap.css is loaded.
<div class="tile"></div><div class="tile double"></div><div class="tile selected"></div><div class="tile bg-color-orange"></div>
  • My practice
       

  •  Code
HTML:

 <div class="container01" οnclick="Show()"><span class="conInf">1 TB 5400转</span><span class="infPrice">-¥500</span></div><div class="tile selected" style="display: none;"></div><div class="container" style="display: none;"><span class="conInf">1 TB 5400转</span><span class="infPrice">-¥500</span></div>
Less:

//win8 tile组件选中状态设置.tile.selected{margin-top: 14px;height: 58px;width: 298.797px;border:4px #4390df solid;&.two{margin-top: 40px;}}.tile.selected:after{position: absolute;display: block;border-bottom: 34px solid #4390df;border-left: 40px solid transparent;right: 10%;top: 18.5%;content: '';z-index: 101;}.tile.selected:before{position: absolute;display: block;content: "\e013";color: #FFFFFF;right: 10%;top: 18.5%;font-family: "Glyphicons Halflings";font-size: 10pt;font-weight: normal;z-index: 102;padding-top: 8px;width: 20px;height: 10px;margin-top: 3px;}
  【项目收获】   陌生
    BootStrap虽然没有接触过,在刚来的时候,也不记得要去用它。组长就提醒我,XX地方可以直接用BootStrap的样式。
   熟悉
   到现在,做的多了,在想怎么去实现之前,都会去查查BootStrap中有没有可以满足我的。再后来,BootStrap原本的一些样式满足不了我的需求,就会去找找其他的经过美化后的样式。
   惊喜
 五一两天,回去看了本书,竟惊喜的发现,BootStrap又一个很炫酷的东西,我们可以在它的基础上直接实现Win8系统界面。
       就这样,一点点前进中......

【BootStrap】陌生=》熟悉=》惊喜相关推荐

  1. 《长调》 :寻找我们共同失去的天堂

    <长调>(大众文艺出版社2008年1月出版)的作者千夫长是蒙古人.他出生于古老的科尔沁草原,如今却生活在中国最现代化的商业前沿--深圳.他的小说更是与现代化这个词格格不入,他的小说地理是远 ...

  2. HTML5实现屏幕手势解锁(转载)

    来源:https://github.com/lvming6816077/H5lock http://threejs.org/examples/ http://www.inf.usi.ch/phd/we ...

  3. 大牛书单 | 腾讯技术大咖推荐你五一看这些书

    导语:读书,伴随技术人的一生.技术人通过读书增长见闻.精进技术,提升人生境界. 2020年五一期间,我们特别邀请几位鹅厂技术大牛分别推荐曾经读过的好书佳作,以飨读者.  推荐人介绍  Mkliu,腾讯 ...

  4. gan神经网络_神经联觉:当艺术遇见GAN

    gan神经网络 Neural Synesthesia is an AI art project that aims to create new and unique audiovisual exper ...

  5. tennylvHTML5实现屏幕手势解锁(转载)

    来源:https://github.com/lvming6816077/H5lock http://threejs.org/examples/ http://www.inf.usi.ch/phd/we ...

  6. 北京欢迎你 (歌词)

    00:09.01]词:林夕 [00:11.37]曲:小柯 00:14.73] [00:18.62][陈天佳]迎接另一个晨曦 带来全新空气 [00:24.49][刘欢]气息改变情味不变 茶香飘满情谊 [ ...

  7. 顺口溜:国足欢迎你(贬)

    [size=medium] <国足欢迎你> 我家球门常打开 要进几个随你 交锋过后就有了底 你会爱上这里 不管远近都是客人 请不用客气 进的少了别在意 下次补给你 我家住着谢亚龙 书写每段 ...

  8. Python基础语法 - 第3关 霍格沃茨来信 input()函数

    [input()函数] 例子: import time print('亲爱的同学:') time.sleep(1) print('我们愉快地通知您,您已获准在霍格沃茨魔法学校就读.') time.sl ...

  9. 第一个工作单位的那些事

    从07年毕业至今,已经将近4年,换了两次工作,相对来说,第一个工作时间最长,3年半.也深刻感受到对于应届毕业生,第一个工作的重要性,第一个单位所在的行业的重要性,换工作易,换行业难.有个好的起点更难. ...

  10. 浅谈 CRTP:奇异递归模板模式

    浅谈 CRTP:奇异递归模板模式 前言 建议先看一遍文末的参考资料! 建议先看一遍文末的参考资料! 建议先看一遍文末的参考资料! 思维导图 一.CRTP 是什么 CRTP 全称 : Curiously ...

最新文章

  1. 从“元宇宙”热炒中理性看待我国虚拟现实产业发展
  2. c语言程序设计例题椭圆,2016年西安邮电大学理学院高级语言程序设计之C语言程序设计复试笔试仿真模拟题...
  3. 你的GitHub,怎么和我用的不太一样?
  4. LINQPad工具-linq、sql、IL优化和转换
  5. 顶隙计算公式_齿轮参数计算公式
  6. Element中时间校验:结束时间大于开始时间
  7. 计算机丢失msvcr100.dll解决办法,如何解决Msvcr100.dll丢失问题?两种方法可以解决...
  8. Ubuntu使用问题备忘录
  9. 黄海广:那些年做的学术公益——你不是一个人在战斗
  10. h264流头类型分辨方法
  11. linux打开7z文件_什么是7Z文件(以及如何打开一个文件)?
  12. 如何避免“被贷款”影响个人信用记录?
  13. 小米怎么解锁,有什么相关教程
  14. 一篇文章从了解到入门shell
  15. 网络编程六-网络编程相关面试题汇总
  16. PHP语言基础知识(超详细)
  17. python中使用opencv的HSV颜色空间提取物体
  18. 手把手教你做音乐播放器(五)音乐列表的存储(上)
  19. Flash Player”又来了“!
  20. android 手机屏幕横屏竖屏切换

热门文章

  1. CMake使用关键点
  2. 职能部门的绩效考核目标如何设定
  3. 启英泰伦-腾讯云小微产品方案
  4. 链路聚合_链路聚合可靠性技术详解(二)
  5. 装箱问题 动态规划 java_[动态规划]装箱问题
  6. 【算法设计与分析】6 最大流应用问题
  7. 三星高层正面回应 Note7爆炸事件,表态将加强后续产品安全管理
  8. 以色列vs巴勒斯坦 印度vs巴基斯坦
  9. 区块链解决实体经济痛点问题的六条主要路径
  10. 关于append函数的疑问