#NanoDB Usage (draft)
定位:跨应用,跨平台
##Creating Database
创建数据库,只需要提供库名(此名字用于标识数据库在内存中的名字)和数据源(数据源为空则是一个空数据库)。数据源的来源不关心,只要是完整的JSON数据对象即可。
nano.db('mydb', {
users: [],
#NanoDB Usage (draft)
定位:跨应用,跨平台
##Creating Database
创建数据库,只需要提供库名(此名字用于标识数据库在内存中的名字)和数据源(数据源为空则是一个空数据库)。数据源的来源不关心,只要是完整的JSON数据对象即可。
nano.db('mydb', {
users: [],
| /* ================================================================ | |
| This copyright notice must be untouched at all times. | |
| The original version of this stylesheet and the associated (x)html | |
| is available at http://www.cssplay.co.uk/menu/cssplay-pie-chart.html | |
| Copyright (c) Stu Nicholls. All rights reserved. | |
| This stylesheet and the associated (x)html may be modified in any | |
| way to fit your requirements. | |
| =================================================================== */ |
| /** | |
| * image shapes | |
| * ------------ | |
| * shapes work in all current versions of Chrome, Firefox, IE, Opera, Safari | |
| * animations work properly in Chrome, Firefox, Safari | |
| * are all wrong in Opera | |
| * and are not supported by IE9 | |
| */ | |
| html { | |
| min-height: 100%; |
| bootstrap-tooltip.js | |
| bootstrap-popover.js | |
| bootstrap-alert.js | |
| bootstrap-button.js | |
| bootstrap-carousel.js | |
| bootstrap-collapse.js | |
| bootstrap-dropdown.js | |
| bootstrap-modal.js | |
| bootstrap-scrollspy.js | |
| bootstrap-tab.js |
| (function($){ | |
| $.fn.extend ({ | |
| center:function() { | |
| return this.each(function(){ | |
| var top = ($(window).height() - $(this).outerHeight())/2; | |
| var left = ($(window).width() - $(this).outerWidth())/2; | |
| $(this).css({position:'absolute',margin:0,top:(top>0 ? top:0)+'px',left:(left>0 ? left:0)+'px'}); | |
| }); | |
| } | |
| }); |
| #box { | |
| width:100px; | |
| height:100px; | |
| border:6px solid #444; | |
| background:red; | |
| animation:change 3s infinite; | |
| } | |
| @keyframes change { | |
| 0% {background:red;} | |
| 100% {background:blue;} |
| /** | |
| * Traffic light animation | |
| */ | |
| #trafficlight{ | |
| background:#333; | |
| height:300px; | |
| width:150px; | |
| border-radius:30px; | |
| margin:3em auto; |
| /* Pounding heart animation */ | |
| @keyframes pound { | |
| to { transform: scale(1.4); } | |
| } | |
| .heart { | |
| display: inline-block; | |
| font-size: 150px; | |
| color: #e00; |
| /** | |
| * iOS 6 style switch checkboxes | |
| * by Lea Verou http://lea.verou.me | |
| */ | |
| :root input[type="checkbox"] { /* :root here acting as a filter for older browsers */ | |
| position: absolute; | |
| opacity: 0; | |
| } |
| /*一淘面试题*/ | |
| .clearfix{*zoom:1;} | |
| .clearfix:before,.clearfix:after{ display: table; content: "\0020"; line-height: 0; } | |
| .clearfix:after { clear: both; } | |
| ol{ padding-left:0; margin:0; list-style-type:none; width:170px;} | |
| li{ float:left;margin-left: -5px; margin-top: -5px; text-align:center;} | |
| li a{color:#008000; border:5px solid #0000f0;width:50px; height:50px; display:block;line-height:50px;text-decoration:none;position:relative; } | |
| li a:hover{ border-color:#f00000;z-index: 1;} |