bootstrap-material-design-个人总结

bootstrap-material-design-个人总结:

所需框架:
1.boostrapt 3.0+
2.jQuery 1.9.1+

项目目录:
Material/
├── css/
│ ├── bootstrap-material-design.css
│ ├── bootstrap-material-design.css.map
│ ├── bootstrap-material-design.min.css
│ ├── bootstrap-material-design.min.css.map
│ ├── ripples.css.map
│ ├── ripples.min.css
│ ├── ripples.min.css.map
├── js/
│ ├── material.js
│ ├── material.min.js
│ ├── material.min.js.map
│ ├── ripples.js
│ ├── ripples.min.js
│ ├── ripples.min.js.map

注意:
.form-horizontal .form-group{
margin-left:-15px;
margin-right:-15px;
}会出现横滚动条,去掉即可

初始化:
$.material.init()

<!doctype html>
<html lang="en">
<head>
    <title>DemoMine</title>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- Bootstrap -->
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Material Design -->
    <link href="css/bootstrap-material-design.css" rel="stylesheet">
    <link href="css/ripples.min.css" rel="stylesheet">
    <!-- jQuery -->
    <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    <!-- Twitter Bootstrap -->
    <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>

    <!-- Material Design for Bootstrap -->
    <script src="js/material.js"></script>
    <script src="js/ripples.min.js"></script>

    <!--修正表单和滚动条问题-->
    <style>
        .form-horizontal .form-group{
            margin:0;
        }
    </style>
</head>
<body>

<!--导航栏-->
<div class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="javascript:void(0)">Brand</a>
        </div>
        <div class="navbar-collapse collapse navbar-responsive-collapse">
            <ul class="nav navbar-nav">
                <li class="active"><a href="javascript:void(0)">Active</a></li>
                <li><a href="javascript:void(0)">Link</a></li>
                <li class="dropdown">
                    <a href="bootstrap-elements.html" data-target="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown
                        <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="javascript:void(0)">Action</a></li>
                        <li><a href="javascript:void(0)">Another action</a></li>
                        <li><a href="javascript:void(0)">Something else here</a></li>
                        <li class="divider"></li>
                        <li class="dropdown-header">Dropdown header</li>
                        <li><a href="javascript:void(0)">Separated link</a></li>
                        <li><a href="javascript:void(0)">One more separated link</a></li>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control col-md-8" placeholder="Search">
                </div>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="javascript:void(0)">Link</a></li>
                <li class="dropdown">
                    <a href="bootstrap-elements.html" data-target="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown
                        <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="javascript:void(0)">Action</a></li>
                        <li><a href="javascript:void(0)">Another action</a></li>
                        <li><a href="javascript:void(0)">Something else here</a></li>
                        <li class="divider"></li>
                        <li><a href="javascript:void(0)">Separated link</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>

<!--表单-->
<div class="form-group label-floating">
    <label class="control-label" for="focusedInput1">Write something to make the label float</label>
    <input class="form-control" id="focusedInput1" type="text">
</div>

<div class="form-group label-floating">
    <label class="control-label" for="focusedInput2">Focus to show the help-block</label>
    <input class="form-control" id="focusedInput2" type="text">
    <p class="help-block">You should really write something here</p>
</div>

<div class="form-group">
    <label class="control-label" for="disabledInput">Disabled input</label>
    <input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled="">
</div>

<div class="form-group has-warning">
    <label class="control-label" for="inputWarning">Input warning</label>
    <input type="text" class="form-control" id="inputWarning">
</div>

<div class="form-group has-error">
    <label class="control-label" for="inputError">Input error</label>
    <input type="text" class="form-control" id="inputError">
</div>

<div class="form-group has-success">
    <label class="control-label" for="inputSuccess">Input success</label>
    <input type="text" class="form-control" id="inputSuccess">
</div>

<div class="form-group">
    <label class="control-label" for="inputLarge">Large input</label>
    <input class="form-control input-lg" type="text" id="inputLarge">
</div>

<div class="form-group">
    <label class="control-label" for="inputDefault">Default input</label>
    <input type="text" class="form-control" id="inputDefault">
</div>

<div class="form-group">
    <label class="control-label" for="inputSmall">Small input</label>
    <input class="form-control input-sm" type="text" id="inputSmall">
</div>

<div class="form-group">
    <label class="control-label" for="addon1">Default label w/input addons</label>
    <div class="input-group">
        <span class="input-group-addon">$</span>
        <input type="text" id="addon1" class="form-control">
        <span class="input-group-btn">
        <button class="btn btn-primary" type="button">Button</button>
    </span>
    </div>
</div>

<div class="form-group label-floating">
    <div class="input-group">
        <span class="input-group-addon">$</span>
        <label class="control-label" for="addon3a">Floating label w/2 addons</label>
        <input type="text" id="addon3a" class="form-control">
        <p class="help-block">The label is inside the <code>input-group</code> so that it is positioned properly as a placeholder.</p>
        <span class="input-group-btn">
      <button type="button" class="btn btn-fab btn-fab-mini">
        <i class="material-icons">send</i>
      </button>
    </span>
    </div>
</div>

<div class="form-group label-floating">

    <label class="control-label" for="addon2">Floating label w/right addon</label>
    <div class="input-group">
        <input type="text" id="addon2" class="form-control">
        <span class="input-group-btn">
      <button type="button" class="btn btn-fab btn-fab-mini">
        <i class="material-icons">functions</i>
      </button>
    </span>
    </div>
</div>

<div class="form-group">
    <input type="file" id="inputFile4" multiple="">
    <div class="input-group">
        <input type="text" readonly="" class="form-control" placeholder="Placeholder w/file chooser...">
        <span class="input-group-btn input-group-sm">
        <button type="button" class="btn btn-fab btn-fab-mini">
          <i class="material-icons">attach_file</i>
        </button>
      </span>
    </div>
</div>

<!--表单2-->
<form class="form-horizontal">
    <fieldset>
        <legend>Legend</legend>
        <div class="form-group">
            <label for="inputEmail" class="col-md-2 control-label">Email</label>

            <div class="col-md-10">
                <input type="email" class="form-control" id="inputEmail" placeholder="Email">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword" class="col-md-2 control-label">Password</label>

            <div class="col-md-10">
                <input type="password" class="form-control" id="inputPassword" placeholder="Password">

                <!--
                <div class="checkbox">
                  <label>
                    <input type="checkbox"> Checkbox
                  </label>
                  <label>
                    <input type="checkbox" disabled> Disabled Checkbox
                  </label>
                </div>
                <br>

                <div class="togglebutton">
                  <label>
                    <input type="checkbox" checked> Toggle button
                  </label>
                </div>
                -->
            </div>
        </div>
        <div class="form-group" style="margin-top: 0;"> <!-- inline style is just to demo custom css to put checkbox below input above -->
            <div class="col-md-offset-2 col-md-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> Checkbox
                    </label>
                    <label>
                        <input type="checkbox" disabled=""> Disabled Checkbox
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <div class="togglebutton">
                    <label>
                        <input type="checkbox" checked=""> Toggle button
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="inputFile" class="col-md-2 control-label">File</label>

            <div class="col-md-10">
                <input type="text" readonly="" class="form-control" placeholder="Browse...">
                <input type="file" id="inputFile" multiple="">
            </div>
        </div>
        <div class="form-group">
            <label for="textArea" class="col-md-2 control-label">Textarea</label>

            <div class="col-md-10">
                <textarea class="form-control" rows="3" id="textArea"></textarea>
                <span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-2 control-label">Radios</label>

            <div class="col-md-10">
                <div class="radio radio-primary">
                    <label>
                        <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked="">
                        Option one is this
                    </label>
                </div>
                <div class="radio radio-primary">
                    <label>
                        <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
                        Option two can be something else
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="select111" class="col-md-2 control-label">Select</label>

            <div class="col-md-10">
                <select id="select111" class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="select222" class="col-md-2 control-label">Select Multiple</label>

            <div class="col-md-10">
                <select id="select222" multiple="" class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-10 col-md-offset-2">
                <button type="button" class="btn btn-default">Cancel</button>
                <button type="submit" class="btn btn-primary">Submit</button>
            </div>
        </div>
    </fieldset>
</form>

<!--表格-->
<table class="table table-striped table-hover ">
    <thead>
    <tr>
        <th>#</th>
        <th>Column heading</th>
        <th>Column heading</th>
        <th>Column heading</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>1</td>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
    </tr>
    <tr>
        <td>2</td>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
    </tr>
    <tr class="info">
        <td>3</td>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
    </tr>
    <tr class="success">
        <td>4</td>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
    </tr>
    <tr class="danger">
        <td>5</td>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
    </tr>
    <tr class="warning">
        <td>6</td>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
    </tr>
    <tr class="active">
        <td>7</td>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
    </tr>
    </tbody>
</table>

<!--tab切换1-->
<ul class="nav nav-tabs" style="margin-bottom: 15px;">
    <li class="active"><a href="#home" data-toggle="tab">Home</a></li>
    <li><a href="#profile" data-toggle="tab">Profile</a></li>
    <li class="disabled"><a>Disabled</a></li>
    <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="bootstrap-elements.html" data-target="#">
            Dropdown <span class="caret"></span>
        </a>
        <ul class="dropdown-menu">
            <li><a href="#dropdown1" data-toggle="tab">Action</a></li>
            <li class="divider"></li>
            <li><a href="#dropdown2" data-toggle="tab">Another action</a></li>
        </ul>
    </li>
</ul>
<div id="myTabContent" class="tab-content">
    <div class="tab-pane fade active in" id="home">
        <p>Raw denim you probably haven‘t heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
    </div>
    <div class="tab-pane fade" id="profile">
        <p>Food truck fixie locavore, accusamus mcsweeney‘s marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit.</p>
    </div>
    <div class="tab-pane fade" id="dropdown1">
        <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney‘s organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork.</p>
    </div>
    <div class="tab-pane fade" id="dropdown2">
        <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater.</p>
    </div>
</div>

<!--分页器-->
<ul class="pagination">
    <li class="disabled"><a href="javascript:void(0)">?</a></li>
    <li class="active"><a href="javascript:void(0)">1</a></li>
    <li><a href="javascript:void(0)">2</a></li>
    <li><a href="javascript:void(0)">3</a></li>
    <li><a href="javascript:void(0)">4</a></li>
    <li><a href="javascript:void(0)">5</a></li>
    <li><a href="javascript:void(0)">?</a></li>
</ul>
<!--左右-->
<ul class="pager">
    <li><a class="withripple" href="javascript:void(0)">Previous</a></li>
    <li><a class="withripple" href="javascript:void(0)">Next</a></li>
</ul>

<ul class="pager">
    <li class="previous disabled"><a href="javascript:void(0)">← Older</a></li>
    <li class="next"><a class="withripple" href="javascript:void(0)">Newer →</a></li>
</ul>

<!--点击按钮示意-->
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">Left</button>

<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">Top</button>

<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus
                                                                                                                                                  sagittis lacus vel augue laoreet rutrum faucibus.">Bottom
</button>

<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">Right</button>

<!--警告条-->
<div class="alert alert-dismissible alert-info">
    <button type="button" class="close" data-dismiss="alert">×</button>
    <strong>Heads up!</strong> This
    <a href="javascript:void(0)" class="alert-link">alert needs your attention</a>, but it‘s not super important.
</div>

<script>
    $.material.init();
</script>

</body>
</html>

  

时间: 2024-12-28 01:17:37

bootstrap-material-design-个人总结的相关文章

超实用!9个目前流行的MATERIAL DESIGN前端框架

http://www.uisdc.com/material-design-frameworks-top-9 谷歌推出的Material Design风格已见有一些APP UI采用,视觉和交互体验都很棒,对于想尝试这个风格但又不懂实现一些效果的前端设计师们,可以试试今天分享的9个目前流行的Material Design前端框架 >>> 这些前端框架的设计元素齐全,按钮.表单.布局及常用JS特效代码也有齐了,支持Responsive Design,还有的可以结合Bootstrap使用,相当不

拥抱Material Design!你的世界里不应该只有Bootstrap

前言 当然这里谈论的是前端UI设计类框架,如果你打开了这篇文章,那你一定不会陌生bootstrap吧,如果你还没听过bootstrap,那就请你关闭了这个页面,当这个文章从来没存在过!如果你对Material Design一无所知或者不是很了解 ,强烈移步<material design学习笔记>这篇文章,超赞!看完你一定会爱上Material Design的!当然,同时他对我们前端的UI实现要求也更高了! 在2014年谷歌高调展示了他们最新的Material Design设计方案,一改往日“

Jquery之家5个顶级Material Design框架

谷歌Material Design在如今的前端页面设计中非常流行.Material Design的设计风格向我们展示了一个简单而有内涵的现代UI设计方案. Material Design是如此的简洁美观,那么,现在有什么Material Design框架可以使用呢?下面我们就一起来看看5个最顶级的Material Design框架. Angular Material Angular Material是目前所有Material Design框架中的大佬级人物.这是因为Angular在互联网上也非常

创建Material Design风格的Android应用--应用主题

昨天正式发布了android 5,同时android developer网站也更新了,增加了创建Material Design风格的Android应用指南,也更新了Support Library,在support library增加了一些Material Design风格的控件和动画等,这里给大家简单介绍一下怎样开发material design风格的Android应用. android 5使用Material Design风格 android提供了三种Material Design风格Them

【Material Design视觉设计语言】应用样式设计

作者:郭孝星 微博:郭孝星的新浪微博 邮箱:[email protected] 博客:http://blog.csdn.net/allenwells Github:https://github.com/AllenWells [Material Design视觉设计语言]章节列表 [Material Design视觉设计语言]开篇 [Material Design视觉设计语言]Material Design设计概述 [Material Design视觉设计语言]应用布局设计 [Material D

Material Design for Developers

质感设计 实在是太酷炫了,很有必要了解一下,应用到APP上. Material Design要符合以下几点: 1.符合material设计规范 2.使用新组件. 3.依赖于Android 5.0(API Level 21)以上的版本.(当然用 library 也可以兼容之前的版本) 如何创建material design apps? 1.使用material主题 -- material theme 2.

使用Material Design 创建App翻译系列----材料主题的使用(Using Material Theme)

上一篇是使用Material Design 创建App翻译系列--開始学习篇,进入正题: 新的材料主题提供了下面内容: 1. 提供了同意设置颜色板的系统部件组件. 2. 为这些系统组件提供了触摸反馈动画. 3. Activity的过渡动画. 依据你的品牌标识,使用你所控制的颜色板能够自己定义材料主题的外观. 使用主题的属性能够给ActionBar 和 status bar进行着色. 系统部件拥有新的设计和触摸反馈动画.你能够为你的应用自己定义颜色板.触摸反馈动画以及Activity之间跳转的过渡

Material Design

资源 原文 http://www.uisdc.com/comprehensive-material-design-note 新鲜热辣!一组实用的 (http://www.uisdc.com/material-design-freebie)[Material Design] 风格素材 ttp://www.uisdc.com/tag/material-design "查看 Material Design 中的全部文章")> 该跟上潮流了!一大波优质的MATERIAL DESIGN资源

[翻译]Android 5.0之应用中实现材料设计—Material Design

上午的时候在刷Google+,看到了Abraham Williams转发了一篇强文,是Android Developers网站新发的一篇博客—Implementing Material Design in your Android App.觉得很前卫,对于新发布的Android版本号Android 5.0是一个很好的学习和了解的机会,所以就花了些时间把它翻译了下来,希望对自己.对其它人有所启发. 因为翻译Android开发博客和API也只是业余爱好,水平有限,其中不免有不准确的地方,所以把原文地

Android Material Design学习之RecyclerView代替 ListView

前言 # Android Material Design越来越流行,以前很常用的 ListView 现在也用RecyclerView代替了,实现原理还是相似的.笔者实现一下 RecyclerView,代码比较简单,适合初学者,如有错误,欢迎指出. 源码地址(欢迎star) https://github.com/studychen/SeeNewsV2 本文链接 http://blog.csdn.net/never_cxb/article/details/50495505,转载请注明出处. 复习 L