├── README.md ├── css ├── global.css └── style.css ├── download ├── empty-templates.zip ├── layout.zip ├── templates.zip └── tobe.zip ├── example ├── accordion │ ├── accordion.css │ ├── accordion.html │ └── accordion.scss ├── avatar │ ├── avatar.css │ ├── avatar.html │ ├── avatar.scss │ └── images │ │ └── img50.jpg ├── basic-simple │ ├── basic-simple.css │ ├── basic-simple.html │ └── basic-simple.scss ├── begin │ └── begin.html ├── breadcrumb │ ├── breadcrumb.css │ ├── breadcrumb.html │ └── breadcrumb.scss ├── btn │ ├── btn.css │ ├── btn.html │ └── btn.scss ├── carousel │ ├── carousel.css │ ├── carousel.html │ ├── carousel.scss │ └── images │ │ └── img160-120.jpg ├── comment │ └── comment.html ├── contact │ └── contact.html ├── form │ ├── form.css │ ├── form.html │ ├── form.scss │ ├── images │ │ ├── accept.gif │ │ ├── code.jpg │ │ ├── exclamation.gif │ │ ├── icon │ │ │ ├── accept.base64.txt │ │ │ ├── accept.gif │ │ │ ├── accept.png │ │ │ ├── error.base64.txt │ │ │ ├── error.gif │ │ │ ├── error.png │ │ │ ├── exclamation.base64.txt │ │ │ ├── exclamation.gif │ │ │ ├── exclamation.png │ │ │ ├── help.png │ │ │ └── tm.gif │ │ └── loading.gif │ └── js │ │ └── formStyle.js ├── form2 │ ├── form.css │ ├── form.html │ ├── form.scss │ ├── images │ │ ├── accept.gif │ │ ├── code.jpg │ │ ├── exclamation.gif │ │ ├── icon │ │ │ ├── accept.base64.txt │ │ │ ├── accept.gif │ │ │ ├── accept.png │ │ │ ├── error.base64.txt │ │ │ ├── error.gif │ │ │ ├── error.png │ │ │ ├── exclamation.base64.txt │ │ │ ├── exclamation.gif │ │ │ ├── exclamation.png │ │ │ ├── help.png │ │ │ └── tm.gif │ │ └── loading.gif │ └── js │ │ └── formStyle.js ├── gallery │ ├── gallery.css │ ├── gallery.html │ └── gallery.scss ├── hdtitle │ ├── hdtitle.css │ ├── hdtitle.html │ └── hdtitle.scss ├── imgslide │ ├── images │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ └── 4.jpg │ ├── imgslide.css │ ├── imgslide.html │ └── imgslide.scss ├── imgstyle │ ├── images │ │ └── img-150.jpg │ ├── imgstyle.css │ ├── imgstyle.html │ └── imgstyle.scss ├── imgtext-horizontal │ ├── images │ │ ├── img250-160.jpg │ │ └── img50.jpg │ ├── imgtext-horizontal.css │ ├── imgtext-horizontal.html │ └── imgtext-horizontal.scss ├── imgtext-vertical │ ├── images │ │ └── img220-130.jpg │ ├── imgtext-vertical.css │ ├── imgtext-vertical.html │ └── imgtext-vertical.scss ├── imgtitle │ ├── images │ │ └── img-150.jpg │ ├── imgtitle.css │ ├── imgtitle.html │ └── imgtitle.scss ├── index │ └── index.html ├── layout │ ├── images │ │ ├── templates1.jpg │ │ ├── templates2.jpg │ │ ├── templates3.jpg │ │ └── templates4.jpg │ └── layout.html ├── modal │ ├── modal.css │ ├── modal.html │ └── modal.scss ├── msg │ ├── msg.css │ ├── msg.html │ └── msg.scss ├── nav │ ├── nav.css │ ├── nav.html │ └── nav.scss ├── paging │ ├── paging.css │ ├── paging.html │ └── paging.scss ├── progress │ ├── progress.css │ ├── progress.html │ └── progress.scss ├── pub │ ├── asidenav-basic-css-block.html │ ├── asidenav-common-design-block.html │ ├── asidenav-js-block.html │ ├── footer.html │ ├── head-cssjs.html │ ├── meta.html │ └── top-bar.html ├── rank │ ├── rank.css │ ├── rank.html │ └── rank.scss ├── speak-list │ ├── images │ │ └── img50.jpg │ ├── speak-list.css │ ├── speak-list.html │ └── speak-list.scss ├── steps │ ├── steps.css │ ├── steps.html │ └── steps.scss ├── table │ ├── table.css │ ├── table.html │ └── table.scss ├── tabs │ ├── tabs.css │ ├── tabs.html │ └── tabs.scss ├── tags-filter │ ├── tags-filter.css │ ├── tags-filter.html │ └── tags-filter.scss ├── templates │ ├── css │ │ ├── templates1.css │ │ ├── templates2.css │ │ ├── templates3.css │ │ └── templates4.css │ ├── sass │ │ ├── templates1.scss │ │ ├── templates2.scss │ │ ├── templates3.scss │ │ └── templates4.scss │ ├── templates1.html │ ├── templates2.html │ ├── templates3.html │ └── templates4.html ├── titlelist │ ├── images │ │ └── icon-circle.gif │ ├── titlelist.css │ ├── titlelist.html │ └── titlelist.scss ├── tooltip │ ├── tooltip.css │ ├── tooltip.html │ └── tooltip.scss ├── typo │ ├── images │ │ └── w3cplus.jpg │ ├── typo.css │ ├── typo.html │ └── typo.scss └── yourself │ ├── componentName.html │ └── componentName.scss ├── sass ├── global.scss └── style.scss └── tobe ├── _base.scss ├── _function.scss ├── components ├── _accordion.scss ├── _alert.scss ├── _avatar.scss ├── _breadcrumb.scss ├── _carousel.scss ├── _col.scss ├── _gallery.scss ├── _hdtitle.scss ├── _imgslide.scss ├── _imgstyle.scss ├── _imgtextH.scss ├── _imgtextV.scss ├── _imgtitle.scss ├── _layout.scss ├── _modal.scss ├── _nav.scss ├── _paging.scss ├── _progress.scss ├── _rank.scss ├── _search.scss ├── _speakList.scss ├── _steps.scss ├── _tabs.scss ├── _tagsFilter.scss ├── _titleList.scss └── _tooltip.scss ├── core ├── _css3.scss ├── _grid.scss ├── _media-queries.scss ├── _mixin.scss ├── _reset.scss └── _setting.scss └── ext ├── _btn.scss ├── _form.scss ├── _helper.scss ├── _message.scss ├── _table.scss ├── _typography.scss ├── animate ├── _attention-seekers.scss ├── _bounce.scss ├── _fade.scss ├── _flip.scss ├── _lightspeed.scss ├── _rotate.scss ├── _slide.scss └── _special.scss └── font-face ├── _font-face.scss ├── _variables.scss └── fonts ├── FontAwesome.otf ├── fontawesome-webfont.eot ├── fontawesome-webfont.svg ├── fontawesome-webfont.ttf └── fontawesome-webfont.woff /README.md: -------------------------------------------------------------------------------- 1 | # 无TOBE,不SASS 2 | 3 | Tobe是一个写给面向熟悉sass人员使用的框架,以[sassCore](https://github.com/marvin1023/sassCore)为核心,所有的组件都单独开发,根据实际需求来调用,避免了臃肿的杂乱代码。由于有着sass的优良基因,tobe的代码更加灵活可控,如果你是一个有着代码洁癖的人,那么tobe的精彩一定不可错过。 4 | 5 | ## Tobe的创新性: 6 | 7 | 基于sass,以[sassCore](https://github.com/marvin1023/sassCore)为核心,为所有组件打好良好的基石。所有组件根据实际需求来调用,结构清晰明了,scss文件一目了然,再也不需要在众多代码中大海捞针,想修改什么立马找到,有的是时间跟妹子聊天。除此之外,因为有着良好的基石,合理的设计,tobe允许你自由开发组件,从此设计自己或公司的ui库不是问题。 8 | 9 | ## tobe结构说明 10 | 11 | * sass文件夹放的是构建tobe这个网站的scss文件,不包括所有的基础文件及组件,你可以打开看下两个scss文件的源码都很简单; 12 | * css就是sass中解析过来的; 13 | * download是放下载打包资源的; 14 | * pending是放用户提交的打包组件; 15 | * example是整个tobe的所有组件的demo及页面; 16 | * tobe文件夹中放的就是所有的基础sass文件及组件,请把它直接放到d盘中去以方便开发。 17 | 18 | ## tobe使用说明 19 | 20 | 1、首先把这个项目中的tobe文件夹(这里面只包括所有的scss文件)直接放进D盘,或者在download文件夹中找到tobe的压缩版,然后解压到D盘中 21 | 22 | 2、新建scss文件,导入tobe中的base或function,如果需要基础的样式及功能,请导入base文件,如果不需要基础样式只需要功能,请导入function文件,代码分别为: 23 | 24 | ```scss 25 | //需要一些基础样式及功能导入base 26 | @import 'D:/tobe/base'; 27 | ``` 28 | ```scss 29 | //只需要功能导入function 30 | @import 'D:/tobe/function'; 31 | ``` 32 | 33 | 3、接着导入你需要的组件,以templates1为例,如布局、导航、滚动图片、三栏等宽。请注意:如果需要改变组件里面默认变量的值,请在导入之前重新申明你需要改变的值,如这里的滚动图片的宽高变量$imgslideView,这也正是为什么我们设置变量的时候要使用!default,因为方便导入到其他scss文件中修改变量的默认值。 34 | 35 | ```scss 36 | //重置变量 37 | $imgslideView: 1000px 340px; 38 | 39 | //import scss 40 | @import "D:/tobe/base"; 41 | @import "D:/tobe/components/layout"; 42 | @import "D:/tobe/components/nav"; 43 | @import "D:/tobe/components/imgslide"; 44 | @import "D:/tobe/components/col"; 45 | ``` 46 | 4、开始你的其他样式 47 | 48 | 49 | -------------------------------------------------------------------------------- /download/empty-templates.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/download/empty-templates.zip -------------------------------------------------------------------------------- /download/layout.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/download/layout.zip -------------------------------------------------------------------------------- /download/templates.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/download/templates.zip -------------------------------------------------------------------------------- /download/tobe.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/download/tobe.zip -------------------------------------------------------------------------------- /example/accordion/accordion.css: -------------------------------------------------------------------------------- 1 | .accordion .accordion-hd{background-color:#ebebeb;height:36px;margin-bottom:10px;cursor:pointer;_overflow:hidden}.accordion .accordion-hd:hover{background-color:#006bce}.accordion .accordion-hd:hover .accordion-title{color:#fff}.accordion .accordion-hd:hover .accordion-arrow{border-top-color:#fff}.accordion .accordion-title{float:left;display:inline;line-height:36px;padding-left:10px;color:#333}.accordion .accordion-bd{padding:0 10px;margin-bottom:10px;display:none}.accordion .accordion-arrow{float:right;display:inline;border-top:8px solid #cfcfcf;border-left:8px dashed transparent;border-right:8px dashed transparent;width:0;height:0;margin:14px 10px 0 0;cursor:pointer;font-size:0}.accordion .expanded{background-color:#0078e7}.accordion .expanded .accordion-title{color:#fff}.accordion .expanded .accordion-arrow{border-top:none;border-bottom:8px solid #fff;_font-size:0}.accordion .expanded+.accordion-bd{display:block} 2 | -------------------------------------------------------------------------------- /example/accordion/accordion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | accordion 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |

学不可以已

25 | 26 |
27 |
28 |

青,取之于蓝,而青于蓝;冰,水为之,而寒于水。木直中绳,輮以为轮,其曲中规。虽有槁暴(pù),不复挺者,輮使之然也。故木受绳则直,金就砺则利,君子博学而日参省乎己,则知明而行无过矣。

29 |
30 |
31 |

天高地厚

32 | 33 |
34 |
35 |

故不登高山,不知天之高也;不临深溪,不知地之厚也;不闻先王之遗言,不知学问之大也。干、越、夷、貉之子,生而同声,长而异俗,教使之然也。诗曰:“嗟尔君子,无恒安息。靖共尔位,好是正直。神之听之,介尔景福。”神莫大于化道,福莫长于无祸。

36 |
37 |
38 |

跬步小流

39 | 40 |
41 |
42 |

积土成山,风雨兴焉;积水成渊,蛟龙生焉;积善成德,而神明自得,圣心备焉。故不积跬步,无以至千里;不积小流,无以成江海。骐骥一跃,不能十步;驽马十驾,功在不舍。锲而舍之,朽木不折;锲而不舍,金石可镂。蚓无爪牙之利,筋骨之强,上食埃土,下饮黄泉,用心一也。蟹六跪而二螯,非蛇鳝之穴无可寄托者,用心躁也。

43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /example/accordion/accordion.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * accordion 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/accordion'; -------------------------------------------------------------------------------- /example/avatar/avatar.css: -------------------------------------------------------------------------------- 1 | .avatar-list{*zoom:1}.avatar-list:before,.avatar-list:after{content:"";display:table}.avatar-list:after{clear:both}.avatar-list strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.avatar-list{margin-right:-10px;*padding-bottom:10px}.avatar-list li,.avatar-list strong{width:56px}.avatar-list li{margin:0 10px 10px 0}.avatar-list img{width:50px;height:50px;padding:2px;border:1px solid #ccc}.avatar-list li{float:left;display:inline}.avatar-list strong{font-weight:normal;text-align:center;display:block;line-height:30px} 2 | -------------------------------------------------------------------------------- /example/avatar/avatar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | avatar 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 | 28 |
29 |
30 |
31 |
32 |
33 | 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /example/avatar/avatar.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * avatar 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/avatar'; -------------------------------------------------------------------------------- /example/avatar/images/img50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/avatar/images/img50.jpg -------------------------------------------------------------------------------- /example/basic-simple/basic-simple.css: -------------------------------------------------------------------------------- 1 | .form-checkbox,.form-radio{margin:0 5px 0 0;padding:0;font-size:12px;*width:13px;*height:13px}.search-text,.form-text,.form-textarea,select{border:1px solid #ccc;padding:4px;vertical-align:middle}.search-text:focus,.form-text:focus,.form-textarea:focus,select:focus{outline:0 none}.search-text,.form-text{height:18px;-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1)}.search-text:focus,.form-text:focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6)}.form-textarea{height:18px;-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);height:80px;width:500px;vertical-align:top}.form-textarea:focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6)}select{*margin-top:5px;*margin-bottom:5px;*vertical-align:top}.search-btn{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;cursor:pointer;text-align:center;font-size:12px;padding:0 15px;height:28px;color:#fff;background-color:#0078e7;border:0 none}.search-btn:hover{color:#fff;background-color:#006bce}.btn{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;cursor:pointer;text-align:center;font-size:12px;padding:0 15px;line-height:28px;color:#fff;background-color:#0078e7;border:0 none}.btn:hover{color:#fff;background-color:#006bce}.formbtn{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;cursor:pointer;text-align:center;font-size:12px;padding:0 15px;height:28px;color:#fff;background-color:#0078e7;border:0 none}.formbtn:hover{color:#fff;background-color:#006bce}.table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:20px}.table th,.table td{border:1px solid #ccc}.table th,.table td{padding:8px;text-align:left} 2 | -------------------------------------------------------------------------------- /example/basic-simple/basic-simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | basic simple 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |

其实很多时候,我们根本要不了那么复杂的表单,表格,按钮,我们的要求很简单,调用上面的那些组件就有点显得大材小用,很浪费很浪费,于是设计了下面这个简洁版的,超级实用。

23 |

1、调用simple.scss中的%simple-btn及%simple-formbtn

24 |
25 | normal btn 26 | 27 | 28 |
29 |

2、调用simple.scss里面的%simple-table

30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
60 |

3、调用simple.scss里面中的form部分

61 |

3.1、text

62 | 63 |

3.2、select

64 | 68 |

3.3、textarea

69 | 70 |

3.4、form btn

71 | 72 | 73 |

3.5、checkbox/radio

74 |

75 | 76 | 77 |

78 |

79 | 80 | 81 | 82 |

83 |
84 |
85 |
86 |
87 |
88 | 89 |
90 | 91 | 92 | -------------------------------------------------------------------------------- /example/basic-simple/basic-simple.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * avatar 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | // @import 'D:/sassCore/simple'; 8 | 9 | // .btn{ 10 | // @extend %simple-btn; 11 | // } 12 | // .formbtn{ 13 | // @extend %simple-formbtn; 14 | // } 15 | // .table{ 16 | // @extend %simple-table; 17 | // } 18 | .search-text, 19 | .form-text{ 20 | @extend %simple-text; 21 | } 22 | .search-btn{ 23 | @include simple-btn(true) 24 | } 25 | .form-textarea{ 26 | @extend %simple-textarea; 27 | } 28 | select{ 29 | @extend %simple-select; 30 | } 31 | .form-checkbox, 32 | .form-radio{ 33 | @extend %reset-radio-checkbox; 34 | } 35 | 36 | .btn{ 37 | @include simple-btn; 38 | } 39 | .formbtn{ 40 | @include simple-btn(true); 41 | } 42 | .table{ 43 | @include simple-table(false, $thBgColor: $orange); 44 | } -------------------------------------------------------------------------------- /example/begin/begin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 使用/开发 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 |
17 |

如何使用tobe及如何为tobe开发组件

18 |

如无特殊说明,tobe中所说的所有sass文件都是指以.scss为后缀名的文件,而不是以.sass为后缀名的文件,这两者的区别还是很大的。最大的区别就是前者如css一样需要大括号,而后者则不需要。

19 |
20 |
21 |

如何使用tobe?

22 |
23 |

1、首先下载tobe压缩版,解压到D盘中,或者从github中把这个项目中的tobe文件夹(这里面只包括所有的scss文件)直接放进D盘

24 |

2、新建scss文件,导入tobe中的base或function,如果需要基础的样式及功能,请导入base文件,如果不需要基础样式只需要功能,请导入function文件,代码分为:

25 |
//需要一些基础样式及功能导入base
26 | @import 'D:/tobe/base';
27 | 
28 |
//只需要功能导入function
29 | @import 'D:/tobe/function';
30 | 
31 |

3、接着导入你需要的组件,以templates1为例,如布局、导航、滚动图片、三栏等宽。请注意:如果需要改变组件里面默认变量的值,请在导入之前重新申明你需要改变的值,如这里的滚动图片的宽高变量$imgslideView,这也正是为什么我们设置变量的时候要使用!default,因为方便导入到其他scss文件中修改变量的默认值。

32 |
//重置变量
33 | $imgslideView:       1000px 340px;
34 | 
35 | //import scss
36 | @import "D:/tobe/base";
37 | @import "D:/tobe/components/layout";
38 | @import "D:/tobe/components/nav";
39 | @import "D:/tobe/components/imgslide";
40 | @import "D:/tobe/components/col";
41 |

4、开始你的其他样式

42 |

模板实例下载

43 |
44 |
45 |
46 |

如何开发自己的组件?

47 |
48 |

1、确保D盘中有你的tobe文件夹,如base的路径为D:/tobe/base,如果没有请参考左边如何使用tobe的第一步

49 |

2、新建scss文件,引入tobe中的base文件,注意这里不能用function来替换,因为base里面有一些基础的样式,如reset等,所以不需要你再来另起一些基础的东西。如果你喜欢tobe的这个布局,你也可以导入组件中的layout(关于布局可以在布局模板页面参考空模板创建或下载下面的两个模板资源)

50 |
@import 'D:/tobe/base';
51 | @import 'D:/tobe/layout';
52 |

3、现在你可以写自己的scss代码了,注意组件中的变量或mixin请以你组件名称做前缀,以避免冲突,变量和函数命名规则采用驼峰式,mixin/%命名采用中划线。如需引入其他组件作为基础,请按照左边的如何使用tobe的第三步引入。

53 |

4、如有疑问,请参考example文件中的实例(注意:因为实例中的html文件已经导入了base生成的基础css文件,所以scss文件中引入的是function和相应组件的scss文件)。

54 |

5、开发好了之后,你可以发给w3cplus,如果质量好,我们可以放在tobe的components里面;或者你可以打包提交到tobe的github pending文件夹里面;如果你只供自己使用的话,可以在tobe中建立一个custom的文件夹,把组件的scss文件改成以下划线开头,并去掉上面的引入基础文件,放进去供你自己使用。

55 |

以上属于从空白开始创建自己的组件,当然如果你想和tobe的其他组件保持一致,拥有统一的tobe头部底部布局,tobe为你在example里面预留了一个yourself的文件夹,你可以用这个开始创建你的组件

56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | 65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /example/breadcrumb/breadcrumb.css: -------------------------------------------------------------------------------- 1 | #breadcrumb{line-height:30px;margin-bottom:20px}#breadcrumb .divider{font-family:"SimSun";margin:0 8px} 2 | -------------------------------------------------------------------------------- /example/breadcrumb/breadcrumb.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | breadcrumb 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 | 30 |
31 |
32 |
33 |
34 | 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /example/breadcrumb/breadcrumb.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * breadcrumb 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/breadcrumb'; -------------------------------------------------------------------------------- /example/btn/btn.css: -------------------------------------------------------------------------------- 1 | .btn,.formbtn{display:inline-block;*display:inline;*zoom:1;cursor:pointer;text-align:center;border:0 none}.btn{padding:0 16px;font-size:14px;line-height:28px;color:#333;background-color:#e6e6e6}.btn:hover{background-color:#d9d9d9;color:#333}.formbtn{padding:0 16px;font-size:14px;height:28px;color:#333;background-color:#e6e6e6}.formbtn:hover{background-color:#d9d9d9;color:#333}.btn-primary{color:#fff;background-color:#0078e7}.btn-primary:hover{background-color:#006bce;color:#fff}.btn,.formbtn{margin:20px}.btns-group{margin-bottom:20px}.btns-group .btn{margin:0}.btn-blue{color:#fff;background-color:#00a3cf}.btn-blue:hover{background-color:#008fb5;color:#fff}.btn-orange{color:#fff;background-color:#f47837}.btn-orange:hover{background-color:#f3681f;color:#fff}.btn-red{color:#fff;background-color:#c30}.btn-red:hover{background-color:#b32d00;color:#fff}.btn-green{color:#fff;background-color:#51b148}.btn-green:hover{background-color:#499f41;color:#fff}.btn-gray-light{color:#333;background-color:#f5f5f5}.btn-gray-light:hover{background-color:#e8e8e8;color:#333}.btn-gray-dark{color:#fff;background-color:#999}.btn-gray-dark:hover{background-color:#8c8c8c;color:#fff}.btn-small{padding:0 5px;font-size:12px;line-height:21px}.formbtn-small{padding:0 5px;font-size:12px;height:21px}.btn-large{padding:0 40px;font-size:18px;line-height:40px}.formbtn-large{padding:0 40px;font-size:18px;height:40px} 2 | -------------------------------------------------------------------------------- /example/btn/btn.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | btn 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |

不同的元素a,button,submit

23 |
normal btn
24 | 25 |

不同颜色

26 | 27 | 28 |

不同大小

29 |
small btnnomal btnlarge btn
30 |
31 |
32 |
33 |
34 |
35 |
36 | 37 |
38 | 39 | -------------------------------------------------------------------------------- /example/btn/btn.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * btn scss 4 | * ------------------------------------------------- 5 | */ 6 | 7 | 8 | 9 | @import 'D:/sassCore/function'; 10 | 11 | $btnSizeClass: (small 5px 21px 12px) (large 40px 40px 18px); 12 | $btnColorClass: (blue $blue #fff) (orange $orange #fff) (red $red #fff) (green $green #fff) (gray-light $grayLight #333) (gray-dark $grayDark #fff); 13 | @import 'D:/sassCore/ext/btn'; 14 | 15 | 16 | .btn,.formbtn{ 17 | margin: 20px; 18 | } 19 | .btns-group{ 20 | margin-bottom: 20px; 21 | .btn{ 22 | margin: 0 23 | } 24 | } 25 | @include btn-color-multi(); 26 | @include btn-size-multi(); -------------------------------------------------------------------------------- /example/carousel/carousel.css: -------------------------------------------------------------------------------- 1 | .carousel li strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.carousel li strong{color:#fff;background-color:#333;background-color:rgba(0,0,0,0.5)}.carousel{*zoom:1}.carousel{position:relative}.carousel .carousel-view{width:920px;margin:0 40px;overflow:hidden}.carousel .carousel-view ul{width:1880px}.carousel li{float:left;display:inline;text-align:center;margin-right:20px;width:168px;position:relative}.carousel li strong{font-weight:normal;position:absolute;left:0;top:120px;width:168px;height:30px;line-height:30px;width:100%}.carousel li img{width:168px;height:150px}.carousel .prev-btn,.carousel .next-btn{position:absolute;text-align:center;height:150px;line-height:150px;top:0;font-family:"SimSun";font-size:40px;font-weight:bold;color:#0078e7;cursor:pointer}.carousel .prev-btn:hover,.carousel .next-btn:hover{color:#006bce}.carousel .prev-btn{left:10px}.carousel .next-btn{right:10px} 2 | -------------------------------------------------------------------------------- /example/carousel/carousel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | carousel 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 | 30 |
31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /example/carousel/carousel.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * carousel 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/carousel'; -------------------------------------------------------------------------------- /example/carousel/images/img160-120.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/carousel/images/img160-120.jpg -------------------------------------------------------------------------------- /example/comment/comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 评论交流 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 |
17 |

评论交流

18 |

把你对tobe的想法,建议或疑问都写在这里吧……

19 | 20 |
21 | 22 | 23 |
24 |
25 |
26 |
27 |
28 | 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /example/contact/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 关于/联系 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 |
17 |

关于/联系

18 |

其实一直在做一些关于html&css方面的总结,从css解决方案html常用结构,但由于受到css本身的限制,想要再扩大就很艰难了。经过一段时间的瓶颈期,然后了解sass,并逐渐练习,最后鉴于sass的优势弥补了css的一些缺陷,于是又萌起搞ui库的念头。在这感谢前领导“星河棋士”的支持,以使我得偿所愿,开始了tobe之旅。

19 |

Tobe的出发点是让代码可控,拒绝臃肿不堪,实现按需求加载。所以更多的是为熟悉sass的人写的,是对自己的一次总结,也是一次挑战吧。如果你对sass了解越多,你的代码就会控制得越好,当然解析出来的css就越是你想要的干净无杂乱冗余的代码,你的体验也就越爽。

20 |

Tobe的核心就是sassCore这个库,所以如果你要想开始tobe,有必要把sassCore这个库搞明白。说白了,sassCore其实就是封装了些mixin和%选择器,然后做了些基础的样式,当然这些样式你还可以选择不调用。而其他所有的组件都是独立开发的,所以实现了按需加载,想要什么就@import什么。打个简单的比喻,sassCore就如jquery,而基于sassCore的ui组件就如基于jquery的js插件。正因为有着如此特性,所以tobe也期待您为它的组件添枝加叶,以使它走得更远。

21 |

因为tobe的东西比较多,所以有必要说明下结构,以tobe的github上的资源为依据,首先包括6个文件夹和一个readme文件,文件夹分别为:sass文件夹放的是构建tobe这个网站的scss文件,不包括所有的基础文件及组件,你可以打开看下两个scss文件的源码都很简单;而css就是sass中解析过来的;download是放下载打包资源的;pending是放用户提交的打包组件;example是整个tobe的所有组件的demo及页面;tobe文件夹中放的就是所有的基础sass文件及组件,请把它直接放到d盘中去以方便开发。

22 |

在写tobe中,其实发生了很多意想不到的事,第一件就是最早公开的sassCore库,这个就是写tobe的时候,总结出来的一些基础文件,这些文件多亏了前同事及朋友的反馈,才有今天这些结构及创新式的调用方式,在此表示感谢那些和我一起吃螃蟹的人;第二件就是推广sassCore的时候,很多人不了解sass,于是问我要些教程,然后才发现国内根本就没有一个系统的介绍sass方面的教程,于是又写了sassGuide这个系列教程,让新手快速入门。还有一些其他的就不在此一一表来,总之由于一些偶然的因素使得tobe的开发工作量越来越大,当然也越来越优秀,也使得身体也每况愈下。所以tobe上线后,我也会好好休息休息调养调养下身体,然后继续积蓄能量,准备下一站。

23 |

在此感谢所有关心支持的朋友,谢谢你们!

24 |

如果您对tobe有什么疑问或建议,可以通过github或w3cplus群(1041263)或sass群(78142855)或微博进行联系。

25 |
26 |
27 |
28 |
29 |
30 | 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /example/form/form.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // form scss 4 | //----------------------------------------------------- 5 | 6 | $lte7: true; 7 | 8 | $msgClassSwitch: true true true true; //错误 成功 警告 提示 9 | 10 | $formMsgSwitch: true; //是否开启报错等信息,如设为true则需导入message.scss 11 | $formConditionSwitch: true; //是否开启条件选项 12 | 13 | $formHorizontalSwitch: true; //是否启用水平表单样式 14 | $formInlineSwitch: true; //是否启用单行表单样式 15 | $formSimpleSwitch: true; //是否启用简洁表单样式 16 | 17 | @import "d:/sassCore/function"; 18 | @import "d:/sassCore/ext/btn"; 19 | @import "d:/sassCore/ext/message"; 20 | @import "d:/sassCore/ext/form"; 21 | -------------------------------------------------------------------------------- /example/form/images/accept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/accept.gif -------------------------------------------------------------------------------- /example/form/images/code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/code.jpg -------------------------------------------------------------------------------- /example/form/images/exclamation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/exclamation.gif -------------------------------------------------------------------------------- /example/form/images/icon/accept.base64.txt: -------------------------------------------------------------------------------- 1 | data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAMFBMVEX///88kTZIoTZnuktxwGB+xG2Vyoag1pSr2J2y26e64LPT4c7j8OD9/vz///80fTAtdG2AAAAAAXRSTlMAQObYZgAAAAFiS0dEDm+9ME8AAAAJcEhZcwAACxMAAAsTAQCanBgAAACcSURBVHheTY6vCsJQHIUPLih6g/gCJotFmEMw+1PwRrmiQ8SBfxhilctewGRSh1XDjBZ9gCXBF1j0Ce5A65J3baecD074DjJ5d5r7tEuWdzYvAB7r7ehWB1grEEN7EKLABVFwdGBIQVytysj5/HmPxl8NUxUvNBiy+4ksPeXbNJnTwQGrnYj6sxC42suenwAoVtxdI1XgVf1tMh/++cUnmPeAc0MAAAAASUVORK5CYII= -------------------------------------------------------------------------------- /example/form/images/icon/accept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/accept.gif -------------------------------------------------------------------------------- /example/form/images/icon/accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/accept.png -------------------------------------------------------------------------------- /example/form/images/icon/error.base64.txt: -------------------------------------------------------------------------------- 1 | data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAKlBMVEX////XY1Hma1rsfGbzhm3vloXwqZz3uanxwLX4z8f76+j//v7////KWkTZGHxrAAAAAXRSTlMAQObYZgAAAAFiS0dEDIGzUWMAAAAJcEhZcwAACxMAAAsTAQCanBgAAACSSURBVHheTc4xC4JAAEDhBwaZUy5tQYgYrl0QBW3aUNvh5WqEBI2WzbU2FbS5SESEa/QT2htb/C/R5pve+FHpEXhHgIa32okTcAkDP3XB8FNPhDJHH0xvw2cSUYv7RSZVB20rZm/L+aBtRFb0/qPc1+iqmtS7jrQOiwjDTiyzNc7hPJH28gvo5jwu9wD3drmuGH4w6SDkKQ/JcAAAAABJRU5ErkJggg== -------------------------------------------------------------------------------- /example/form/images/icon/error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/error.gif -------------------------------------------------------------------------------- /example/form/images/icon/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/error.png -------------------------------------------------------------------------------- /example/form/images/icon/exclamation.base64.txt: -------------------------------------------------------------------------------- 1 | data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAM1BMVEX////4ol3+lDf8nEP7hTH3sHb8uHr9x5HvgjTccCbxdCv0ey365M/98ur////UZyH41bQKCY76AAAAAXRSTlMAQObYZgAAAAFiS0dEDm+9ME8AAAAJcEhZcwAACxMAAAsTAQCanBgAAAB/SURBVHhebc83FoRQDENR5Phj2P9qR3CYDnfvqvL1efNAFTn/PaCRGaLnbY6hNNgjE0jVtUQSZRJS2TdQShIQoSIEM6AQJNkE48Um2A02lvXeH1AHN8/eGlAJWdKsr9Vai+qEWcAVYJc9CNepGkywD/ORCndU9nvD697bx+fnP09wBLDgAeJUAAAAAElFTkSuQmCC -------------------------------------------------------------------------------- /example/form/images/icon/exclamation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/exclamation.gif -------------------------------------------------------------------------------- /example/form/images/icon/exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/exclamation.png -------------------------------------------------------------------------------- /example/form/images/icon/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/help.png -------------------------------------------------------------------------------- /example/form/images/icon/tm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/icon/tm.gif -------------------------------------------------------------------------------- /example/form/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form/images/loading.gif -------------------------------------------------------------------------------- /example/form/js/formStyle.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | $(function(){ 3 | var $main = $('#main'); 4 | var $form = $main.find('form'); 5 | var $inputText = $form.find('input[type="password"],input[type="text"]'); 6 | // var $inputText = $form.find('input[type="text"]').add($inputPwd); 7 | var $inputRadio = $form.find('input[type="radio"]'); 8 | var $inputCheckbox = $form.find('input[type="checkbox"]'); 9 | var $inputSubmit = $form.find('input[type="submit"]'); 10 | $form.addClass('form'); 11 | $inputText.addClass('form-text'); 12 | $inputRadio.addClass('form-radio'); 13 | $inputCheckbox.addClass('form-checkbox'); 14 | $inputSubmit.addClass('inputbtn greybtn') 15 | }) 16 | })(jQuery) -------------------------------------------------------------------------------- /example/form2/form.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * form scss 4 | * ------------------------------------------------- 5 | */ 6 | $inputTextWidth:200px; 7 | $formInlineSwitch:true; 8 | $formSimpleSwitch:true; 9 | @import 'D:/tobe/function'; 10 | @import 'D:/tobe/components/form'; -------------------------------------------------------------------------------- /example/form2/images/accept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/accept.gif -------------------------------------------------------------------------------- /example/form2/images/code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/code.jpg -------------------------------------------------------------------------------- /example/form2/images/exclamation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/exclamation.gif -------------------------------------------------------------------------------- /example/form2/images/icon/accept.base64.txt: -------------------------------------------------------------------------------- 1 | data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAMFBMVEX///88kTZIoTZnuktxwGB+xG2Vyoag1pSr2J2y26e64LPT4c7j8OD9/vz///80fTAtdG2AAAAAAXRSTlMAQObYZgAAAAFiS0dEDm+9ME8AAAAJcEhZcwAACxMAAAsTAQCanBgAAACcSURBVHheTY6vCsJQHIUPLih6g/gCJotFmEMw+1PwRrmiQ8SBfxhilctewGRSh1XDjBZ9gCXBF1j0Ce5A65J3baecD074DjJ5d5r7tEuWdzYvAB7r7ehWB1grEEN7EKLABVFwdGBIQVytysj5/HmPxl8NUxUvNBiy+4ksPeXbNJnTwQGrnYj6sxC42suenwAoVtxdI1XgVf1tMh/++cUnmPeAc0MAAAAASUVORK5CYII= -------------------------------------------------------------------------------- /example/form2/images/icon/accept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/accept.gif -------------------------------------------------------------------------------- /example/form2/images/icon/accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/accept.png -------------------------------------------------------------------------------- /example/form2/images/icon/error.base64.txt: -------------------------------------------------------------------------------- 1 | data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAKlBMVEX////XY1Hma1rsfGbzhm3vloXwqZz3uanxwLX4z8f76+j//v7////KWkTZGHxrAAAAAXRSTlMAQObYZgAAAAFiS0dEDIGzUWMAAAAJcEhZcwAACxMAAAsTAQCanBgAAACSSURBVHheTc4xC4JAAEDhBwaZUy5tQYgYrl0QBW3aUNvh5WqEBI2WzbU2FbS5SESEa/QT2htb/C/R5pve+FHpEXhHgIa32okTcAkDP3XB8FNPhDJHH0xvw2cSUYv7RSZVB20rZm/L+aBtRFb0/qPc1+iqmtS7jrQOiwjDTiyzNc7hPJH28gvo5jwu9wD3drmuGH4w6SDkKQ/JcAAAAABJRU5ErkJggg== -------------------------------------------------------------------------------- /example/form2/images/icon/error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/error.gif -------------------------------------------------------------------------------- /example/form2/images/icon/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/error.png -------------------------------------------------------------------------------- /example/form2/images/icon/exclamation.base64.txt: -------------------------------------------------------------------------------- 1 | data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAM1BMVEX////4ol3+lDf8nEP7hTH3sHb8uHr9x5HvgjTccCbxdCv0ey365M/98ur////UZyH41bQKCY76AAAAAXRSTlMAQObYZgAAAAFiS0dEDm+9ME8AAAAJcEhZcwAACxMAAAsTAQCanBgAAAB/SURBVHhebc83FoRQDENR5Phj2P9qR3CYDnfvqvL1efNAFTn/PaCRGaLnbY6hNNgjE0jVtUQSZRJS2TdQShIQoSIEM6AQJNkE48Um2A02lvXeH1AHN8/eGlAJWdKsr9Vai+qEWcAVYJc9CNepGkywD/ORCndU9nvD697bx+fnP09wBLDgAeJUAAAAAElFTkSuQmCC -------------------------------------------------------------------------------- /example/form2/images/icon/exclamation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/exclamation.gif -------------------------------------------------------------------------------- /example/form2/images/icon/exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/exclamation.png -------------------------------------------------------------------------------- /example/form2/images/icon/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/help.png -------------------------------------------------------------------------------- /example/form2/images/icon/tm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/icon/tm.gif -------------------------------------------------------------------------------- /example/form2/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/form2/images/loading.gif -------------------------------------------------------------------------------- /example/form2/js/formStyle.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | $(function(){ 3 | var $main = $('#main'); 4 | var $form = $main.find('form'); 5 | var $inputText = $form.find('input[type="password"],input[type="text"]'); 6 | // var $inputText = $form.find('input[type="text"]').add($inputPwd); 7 | var $inputRadio = $form.find('input[type="radio"]'); 8 | var $inputCheckbox = $form.find('input[type="checkbox"]'); 9 | var $inputSubmit = $form.find('input[type="submit"]'); 10 | $form.addClass('form'); 11 | $inputText.addClass('form-text'); 12 | $inputRadio.addClass('form-radio'); 13 | $inputCheckbox.addClass('form-checkbox'); 14 | $inputSubmit.addClass('inputbtn greybtn') 15 | }) 16 | })(jQuery) -------------------------------------------------------------------------------- /example/gallery/gallery.css: -------------------------------------------------------------------------------- 1 | .imgtitle-list{*zoom:1}.imgtitle-list:before,.imgtitle-list:after{content:"";display:table}.imgtitle-list:after{clear:both}.imgtitle-list strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gallery .gallery-view .alpha-bar,.imgtitle-list-alpha strong{color:#fff;background-color:#333;background-color:rgba(0,0,0,0.5)}.gallery .gallery-thumb{*zoom:1}.gallery{width:486px;margin-left:auto;margin-right:auto}.gallery .gallery-view{margin-bottom:10px}.gallery .gallery-view img{width:486px;height:366px;vertical-align:middle}.gallery .gallery-view .alpha-bar{width:100%;position:relative;height:36px;line-height:36px;margin-top:-36px}.gallery .gallery-view .alpha-bar .title{float:left;display:inline;width:366px;margin-left:10px;vertical-align:middle}.gallery .gallery-view .alpha-bar .num-calc{float:right;display:inline;width:80px;text-align:right;margin-right:10px}.gallery .gallery-thumb{position:relative}.gallery .gallery-thumb .gallery-thumb-view{margin:0 20px;width:446px;overflow:hidden}.gallery .gallery-thumb ul{width:912px}.gallery .gallery-thumb li{margin-right:10px}.gallery .gallery-thumb li img{border:1px solid #ccc;padding:1px;width:100px;height:75px}.gallery .gallery-thumb li img:hover{border-color:#0078e7}.gallery .gallery-thumb .thumb-prev-btn,.gallery .gallery-thumb .thumb-next-btn{position:absolute;text-align:center;height:79px;line-height:79px;top:0;font-family:"SimSun";width:10px;font-weight:bold;color:#333;background-color:#e8e8e8;cursor:pointer}.gallery .gallery-thumb .thumb-prev-btn:hover,.gallery .gallery-thumb .thumb-next-btn:hover{color:#fff;background-color:#0078e7}.gallery .gallery-thumb .thumb-prev-btn{left:0}.gallery .gallery-thumb .thumb-next-btn{right:0}.imgtitle-list{margin-right:-20px;*padding-bottom:20px}.imgtitle-list li,.imgtitle-list strong{width:171px}.imgtitle-list li{margin:0 20px 20px 0}.imgtitle-list img{width:171px;height:126px}.imgtitle-list li{float:left;display:inline}.imgtitle-list strong{font-weight:normal;text-align:center;display:block;line-height:30px}.imgtitle-list-alpha li{position:relative}.imgtitle-list-alpha strong{top:96px;width:161px;position:absolute;left:0;color:#fff;padding:0 5px} 2 | -------------------------------------------------------------------------------- /example/gallery/gallery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | gallery 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 | 80 |
81 |
82 |
83 |
84 | 85 |
86 | 87 | 88 | -------------------------------------------------------------------------------- /example/gallery/gallery.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * tabs 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/gallery'; 8 | 9 | //重置imgtitle的img大小,然后导入 10 | $imgtitleImgSize: 171px 126px; 11 | @import 'D:/tobe/components/imgtitle'; 12 | -------------------------------------------------------------------------------- /example/hdtitle/hdtitle.css: -------------------------------------------------------------------------------- 1 | .hd-title,.block-hd{*zoom:1}.hd-title:before,.block-hd:before,.hd-title:after,.block-hd:after{content:"";display:table}.hd-title:after,.block-hd:after{clear:both}.hd-title,.block-hd{text-align:right;line-height:36px}.hd-title h2,.block-hd h2,.hd-title h3,.block-hd h3{float:left;display:inline;line-height:36px;margin-left:10px}.hd-title .more,.block-hd .more{font-family:"SimSun";margin-right:10px;font-size:12px}.hd-title,.block-hd{background-color:#ebebeb}.aside-block .block-hd,.aside-block .block-hd h3{line-height:30px} 2 | -------------------------------------------------------------------------------- /example/hdtitle/hdtitle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | hdtitle 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |

区块标题

23 |
24 |

区块标题

25 | 更多>> 26 |
27 |
28 |
29 |
30 |
31 |
32 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /example/hdtitle/hdtitle.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * hdtitle scss 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/hdtitle'; -------------------------------------------------------------------------------- /example/imgslide/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgslide/images/1.jpg -------------------------------------------------------------------------------- /example/imgslide/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgslide/images/2.jpg -------------------------------------------------------------------------------- /example/imgslide/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgslide/images/3.jpg -------------------------------------------------------------------------------- /example/imgslide/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgslide/images/4.jpg -------------------------------------------------------------------------------- /example/imgslide/imgslide.css: -------------------------------------------------------------------------------- 1 | .imgslide .slide-control,.imgslide .prev-btn,.imgslide .next-btn{color:#fff;background-color:#333;background-color:rgba(0,0,0,0.5)}.imgslide{position:relative;width:745px;margin-bottom:20px}.imgslide .slide-view{overflow:hidden}.imgslide .slide-view,.imgslide .slide-view img{width:745px;height:300px}.imgslide .slide-view ul{width:2980px}.imgslide .slide-view li{width:745px}.imgslide .slide-bullet{position:absolute;right:10px;bottom:10px}.imgslide .slide-bullet a{float:left;display:inline;font-family:Tahoma;font-size:24px;line-height:1;cursor:pointer;margin-right:5px;color:#f5f5f5}.imgslide .slide-bullet a.active,.imgslide .slide-bullet a:hover{color:#00a3cf}.imgslide .slide-control{position:absolute;left:0;bottom:0;height:36px;width:745px;line-height:36px}.imgslide .slide-title{width:625px;color:#fff;padding-left:10px;display:inline-block;*display:inline;*zoom:1}.imgslide .prev-btn,.imgslide .next-btn{position:absolute;top:102px;font-family:"SimSun";font-size:30px;font-weight:bold;width:30px;height:60px;line-height:60px;cursor:pointer;color:#fff;text-align:center}.imgslide .prev-btn:hover,.imgslide .next-btn:hover{color:#00a3cf}.imgslide .prev-btn{left:0}.imgslide .next-btn{right:0} 2 | -------------------------------------------------------------------------------- /example/imgslide/imgslide.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | imgtext-vertical 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
    25 |
  • 图片一
  • 26 |
  • 27 |
  • 28 |
  • 29 |
30 |
31 |
32 |

标题,来自滚动图片的alt或图片链接a的title

33 |
34 | 35 | 36 | 37 | 38 |
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 |
47 | 48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /example/imgslide/imgslide.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * imgslide 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/imgslide'; -------------------------------------------------------------------------------- /example/imgstyle/images/img-150.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgstyle/images/img-150.jpg -------------------------------------------------------------------------------- /example/imgstyle/imgstyle.css: -------------------------------------------------------------------------------- 1 | .img-border{padding:2px;border:1px solid #ccc}.img-rounded{border-radius:8px}.img-circle{border-radius:50%} 2 | -------------------------------------------------------------------------------- /example/imgstyle/imgstyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | imgstyle 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 | 23 | 24 | 25 |
26 |
27 |
28 |
29 |
30 | 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /example/imgstyle/imgstyle.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * imgstyle 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/imgstyle'; 8 | 9 | .img-border{ 10 | @extend %img-border; 11 | } 12 | 13 | .img-rounded{ 14 | @extend %img-rounded; 15 | } 16 | 17 | .img-circle{ 18 | @extend %img-circle; 19 | } -------------------------------------------------------------------------------- /example/imgtext-horizontal/images/img250-160.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgtext-horizontal/images/img250-160.jpg -------------------------------------------------------------------------------- /example/imgtext-horizontal/images/img50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgtext-horizontal/images/img50.jpg -------------------------------------------------------------------------------- /example/imgtext-horizontal/imgtext-horizontal.css: -------------------------------------------------------------------------------- 1 | .imgtext-h{*zoom:1}.imgtext-h:before,.imgtext-h:after{content:"";display:table}.imgtext-h:after{clear:both}.imgtext-h-block .text-right h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.imgtext-h-list li{border-bottom:1px dashed #ccc;padding-top:10px;padding-bottom:10px}.imgtext-h .text-right,.imgtext-h-list .text-right,.imgtext-h-block .text-right{*zoom:1}.imgtext-h .img-left,.imgtext-h-list .img-left,.imgtext-h-block .img-left{float:left;display:inline}.imgtext-h .text-right,.imgtext-h-list .text-right,.imgtext-h-block .text-right{overflow:hidden}.imgtext-h .text-right h3,.imgtext-h-list .text-right h3,.imgtext-h-block .text-right h3{line-height:1.3;font-weight:bold}.imgtext-h .img-left{margin-right:10px;_margin-right:7px}.imgtext-h .img-left img{width:250px;height:160px}.imgtext-h .text-right h3{margin-bottom:10px}.imgtext-h-list .img-left{margin-right:10px;_margin-right:7px}.imgtext-h-list .img-left img{width:250px;height:160px}.imgtext-h-list li{min-height:160px;height:auto !important;_height:160px}.imgtext-h-list .text-right h3{font-size:16px;margin-bottom:10px}.imgtext-h-block{font-size:12px}.imgtext-h-block li{min-height:50px;height:auto !important;_height:50px;padding:5px 0}.imgtext-h-block .img-left{margin-right:5px;_margin-right:2px}.imgtext-h-block .img-left img{width:50px;height:50px}.imgtext-h-block .text-right h3{font-size:12px;font-weight:normal;width:100%} 2 | -------------------------------------------------------------------------------- /example/imgtext-horizontal/imgtext-horizontal.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * imgtextH 4 | * 水平图文混排 5 | * ------------------------------------------------- 6 | */ 7 | @import 'D:/sassCore/function'; 8 | @import 'D:/tobe/components/imgtextH'; 9 | -------------------------------------------------------------------------------- /example/imgtext-vertical/images/img220-130.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgtext-vertical/images/img220-130.jpg -------------------------------------------------------------------------------- /example/imgtext-vertical/imgtext-vertical.css: -------------------------------------------------------------------------------- 1 | .imgtext-v-list{*zoom:1}.imgtext-v-list:before,.imgtext-v-list:after{content:"";display:table}.imgtext-v-list:after{clear:both}.imgtext-v-list h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.imgtext-v-list{margin-right:-20px;*padding-bottom:20px}.imgtext-v-list li{width:220px;margin:0 20px 20px 0}.imgtext-v-list img{width:220px;height:130px}.imgtext-v-list li{float:left;display:inline}.imgtext-v-list .img-link{display:block}.imgtext-v-list h3{width:100%;font-weight:normal;line-height:30px} 2 | -------------------------------------------------------------------------------- /example/imgtext-vertical/imgtext-vertical.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | imgtext-vertical 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
    23 |
  • 24 | 25 |

    我是标题超出隐藏

    26 |

    适用于一些垂直型的图文,尤其适合展示一些产品列表,游戏、视频列表等...

    27 |
  • 28 |
  • 29 | 30 |

    我是标题超出隐藏

    31 |

    适用于一些垂直型的图文,尤其适合展示一些产品列表,游戏、视频列表等...

    32 |
  • 33 |
  • 34 | 35 |

    我是标题超出隐藏

    36 |

    适用于一些垂直型的图文,尤其适合展示一些产品列表,游戏、视频列表等...

    37 |
  • 38 |
  • 39 | 40 |

    我是标题超出隐藏

    41 |

    适用于一些垂直型的图文,尤其适合展示一些产品列表,游戏、视频列表等...

    42 |
  • 43 |
44 |
45 |
46 |
47 |
48 |
49 | 50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /example/imgtext-vertical/imgtext-vertical.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * imgtextV 4 | * 图文垂直列表 5 | * ------------------------------------------------- 6 | */ 7 | @import 'D:/sassCore/function'; 8 | @import 'D:/tobe/components/imgtextV'; 9 | 10 | -------------------------------------------------------------------------------- /example/imgtitle/images/img-150.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/imgtitle/images/img-150.jpg -------------------------------------------------------------------------------- /example/imgtitle/imgtitle.css: -------------------------------------------------------------------------------- 1 | .imgtitle-list{*zoom:1}.imgtitle-list:before,.imgtitle-list:after{content:"";display:table}.imgtitle-list:after{clear:both}.imgtitle-list strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.imgtitle-list-alpha strong{color:#fff;background-color:#333;background-color:rgba(0,0,0,0.5)}.imgtitle-list{margin-right:-20px;*padding-bottom:20px}.imgtitle-list li,.imgtitle-list strong{width:171px}.imgtitle-list li{margin:0 20px 20px 0}.imgtitle-list img{width:171px;height:150px}.imgtitle-list li{float:left;display:inline}.imgtitle-list strong{font-weight:normal;text-align:center;display:block;line-height:30px}.imgtitle-list-alpha li{position:relative}.imgtitle-list-alpha strong{top:120px;width:161px;position:absolute;left:0;color:#fff;padding:0 5px} 2 | -------------------------------------------------------------------------------- /example/imgtitle/imgtitle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | imgtitle 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 | 37 |
38 |
39 | 40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /example/imgtitle/imgtitle.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * imgtitle 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/imgtitle'; 8 | 9 | -------------------------------------------------------------------------------- /example/index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tobe 6 | 7 | 8 | 9 | 10 |
11 | 12 | 18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |

sass基础

26 |
27 |

Tobe是用sass写的,所以拥有sass的所有优点,如变量、嵌套、混入、占位选择器,继承,运算,函数等等,使得CSS的开发变得简单清晰可维护,同时也大大节省了时间,提高了效率。

28 |
29 |
30 |
31 |

sassCore核心

32 |
33 |

Tobe以sassCore为核心,而sassCore从基础出发,以实战为导向,凝练总结了基础的各大方面,并提供了两种调用模式,有此核心,确保了所有组件的良好基石。

34 |
35 |
36 |
37 |

组件式开发

38 |
39 |

Tobe所有ui组件单独开发,互不干扰,以拒绝臃肿代码为导向,实现需要什么就导入什么。再也不需要在众多代码中大海捞针,想修改什么立马找到,有的是时间跟妹子聊天。

40 |
41 |
42 |
43 |

公开开放

44 |
45 |

Tobe要做的决不只是你现在所看到的,它的设计优势决定了它可以如jquery那样,可以由开发者自己去开发相应的ui组件,而不仅限于现在的tobe,这才是tobe的真正价值。

46 |
47 |
48 |
49 |
50 |

CSSer们,欢呼吧!真正属于我们的ui组件式开发来临了!
51 | 拒绝臃肿,拒绝乱七八糟,拒绝不明不白,向tobe说开始!

52 | 开始Tobe之旅 53 |
54 |
55 |
56 |
57 |
58 |
59 | 60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /example/layout/images/templates1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/layout/images/templates1.jpg -------------------------------------------------------------------------------- /example/layout/images/templates2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/layout/images/templates2.jpg -------------------------------------------------------------------------------- /example/layout/images/templates3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/layout/images/templates3.jpg -------------------------------------------------------------------------------- /example/layout/images/templates4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/layout/images/templates4.jpg -------------------------------------------------------------------------------- /example/layout/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 布局模板 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 |
17 |

布局模板

18 |

1、模板实例

19 |
20 |
21 | 模板一 22 |
23 |
24 | 模板二 25 |
26 |
27 | 模板三 28 |
29 |
30 | 模板四 31 |
32 |
33 |

模板实例下载

34 |

2、空白模板创建

35 |

2.1、html结构

36 |

下面的html代码结构均采用emmet(zencoding升级版)方式,如不明白,建议先看下emmet,或者直接下载空模板文件查看

37 |
//html5文档申明
38 | //-------------------------
39 | html:5
40 | 
41 | //无边栏
42 | //-------------------------
43 | .page>(.wrap-header>#header>.inner-header)+(.wrap-container>#container.clearfix>#main>.inner-main)+(.wrap-footer>#footer>.inner-footer)
44 | 
45 | //左边栏
46 | //在无边栏基础上,.page上再添加.layout-lm,然后再在container里面,main前面添加aside-first
47 | //-------------------------
48 | .page.layout-lm>(.wrap-header>#header>.inner-header)+(.wrap-container>#container.clearfix>((#aside_first.aside>.inner-aside)+(#main>.inner-main)))+(.wrap-footer>#footer>.inner-footer)
49 | 
50 | //右边栏
51 | //在无边栏基础上,.page上再添加.layout-mr,然后再在container里面,main后面添加aside-second
52 | //-------------------------
53 | .page.layout-mr>(.wrap-header>#header>.inner-header)+(.wrap-container>#container.clearfix>((#main>.inner-main)+(#aside_second.aside>.inner-aside)))+(.wrap-footer>#footer>.inner-footer)
54 | 
55 | //左右边栏
56 | //在无边栏基础上,.page上再添加.layout-lmr,然后再在container里面,main前面添加aside-first,
57 | //main后面添加aside-second
58 | //-------------------------
59 | .page.layout-lm>(.wrap-header>#header>.inner-header)+(.wrap-container>#container.clearfix>((#aside_first.aside>.inner-aside)+(#main>.inner-main)+(#aside_second.aside>.inner-aside)))+(.wrap-footer>#footer>.inner-footer)
60 | 61 |

2.2、scss引用

62 |

在scss文件中先导入核心文件base,再导入components中的组件layout就ok,默认为固定1000px,如果需要改成960网格系统,请设置$gridColumnWidth为60px就ok,通过设置$gridPercentSwitch来切换到流体布局。

63 |
//固定布局
64 | //-------------------------                
65 | @import 'D:/tobe/base';
66 | @import 'D:/tobe/components/layout';
67 | 
68 | //流体布局
69 | //-------------------------
70 | $gridPercentSwitch: true;
71 | @import 'D:/tobe/base';
72 | @import 'D:/tobe/components/layout';
73 | 
74 | 75 |

空模板文件下载布局实例下载

76 |
77 |
78 |
79 |
80 |
81 | 82 |
83 | 84 | 85 | -------------------------------------------------------------------------------- /example/modal/modal.css: -------------------------------------------------------------------------------- 1 | .btn,.formbtn{display:inline-block;*display:inline;*zoom:1;cursor:pointer;text-align:center;border:0 none}.btn{padding:0 16px;font-size:14px;line-height:28px;color:#333;background-color:#e6e6e6}.btn:hover{background-color:#d9d9d9;color:#333}.formbtn{padding:0 16px;font-size:14px;height:28px;color:#333;background-color:#e6e6e6}.formbtn:hover{background-color:#d9d9d9;color:#333}.btn-primary{color:#fff;background-color:#0078e7}.btn-primary:hover{background-color:#006bce;color:#fff}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1100;background-color:rgba(0,0,0,0.5)}.modal-box{position:absolute;top:50%;left:50%;width:500px;height:220px;margin-left:-250px;margin-top:-110px;border:2px solid #ccc;z-index:1105;background-color:#FFF}.modal-box .modal-hd,.modal-box .modal-bd,.modal-box .modal-ft{padding:0 15px}.modal-box .modal-hd{height:36px;text-align:right;border-bottom:1px solid #ccc}.modal-box .modal-hd h3{float:left;display:inline;line-height:36px;font-weight:bold}.modal-box .modal-bd{margin:15px 0}.modal-box .modal-ft{text-align:center;padding:10px 15px}.modal-box .modal-ft .btn{margin-left:20px}.modal-box .modal-del{display:inline-block;*display:inline;*zoom:1;padding:0 5px;cursor:pointer;font-size:30px;line-height:36px;height:36px;margin-right:-10px}.modal-box .modal-del:hover{background-color:#f5f5f5;border-radius:6px} 2 | -------------------------------------------------------------------------------- /example/modal/modal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | modal 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 | 23 |
24 |
25 |
26 |
27 | 28 |
29 |
30 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /example/modal/modal.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * modal 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/sassCore/ext/btn'; 8 | @import 'D:/tobe/components/modal'; -------------------------------------------------------------------------------- /example/msg/msg.css: -------------------------------------------------------------------------------- 1 | .error,.success,.warning,.info{padding:8px;padding-left:25px;background-position:5px center;background-repeat:no-repeat}.error a,.success a,.warning a,.info a{text-decoration:underline}.error{background-color:#fbe3e4;border:2px solid #fbc2c4;color:#8a1f11;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAw1BMVEX////////uVVXuVFTkSEjVb1HsUlLnS0vvW1vmS0vuWVnvXV3dPj7rUFDkyLz2o6P1mZndQD3rUVHVbU/dPz3kR0fUclLdQTzbUDvaWj/69fP60dHeQjvTg2btVFTcTzvmSkrdTTr//f3lzL/UgWTvYWH++fniwbLvX1/zhYXVbEzygYH0k5P709P95ub+8fHwZ2fjxbj1nZ3839/6z8/xcXHdSzrdTDreQzv83d32n5/eQjz3q6v+9fXwa2v96+v84eGH3JX9AAAAAXRSTlMAQObYZgAAALlJREFUeF49jlWSxDAMBSXZDjLDMDPPMt7/VCsnU9t/3VV+FmhmRRXHVTGDB4P+2BfCH/cHrTZ1nlBLktcNh1S6nxtWJ9yTVACrTISIEVl3xO9hdoHUpKcl4jv7zSFbwQsP7LiwL3hmArEgos0U8Yedhq9tsHrIXHX4gGeDrAPiccmlfbI1KUJ8W/PO9Exmyt/S7qu35uXTryuyFcBW0j8y7U43OjX06Zp5aSe8Z5dzeBCokeeNVKDlD2nuD2i4ItR8AAAAAElFTkSuQmCC)}.error a{color:#8a1f11}.success{background-color:#e6efc2;border:2px solid #c6d880;color:#264409;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAwFBMVEX///////+TzSPD44WSzCOUziaSyyOXzyuZ0DCNxCKn1kyEuCDs9tjt99uOxiKDtx+MwyGx22HP6Z2l1UfC44ORyiOQySKp10/K5ZePxyLv9uDt9d2RyiWZwUuHvCONuTaRyyPI3KCnyGXk7s+Yzy233G3P5Kbx9ueQyCL8/fq81YuTzCOg0UHN36mOvDfu9938/vrg78Gd0TqIviDh78b1+u3C34ms1VuNwSmGuyCh0z+PyCL6/PeXzS+KwCHj7c4XsX5IAAAAAXRSTlMAQObYZgAAAKZJREFUeF5lj9XKQ0EQg3dm5bhr1d1dfn3/t+r0dCmFfncJCSTswYYXUhZ8wzSxgRVGXMlthC+iLRkc3+CMeVILMdrtUXqvwOIyg7OiSKKN5QkG1wwTZpL4QvxtwGQdKjTJECWUzSP8tP4yxCFV8jFAHaB/yBGpkuK03QOA+e0biZS5UlnBCv4dX5CWLqOIspxOYIkq8JyuaqHf1dM/zun7NqL9vH8HBjcL2lWtIocAAAAASUVORK5CYII=)}.success a{color:#264409}.warning{background-color:#fff6bf;border:2px solid #ffd324;color:#514721;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAZlBMVEX/////sCfvmQL3oxHLq2XLrGj5phb/rybj3czMtoPm4dL9rCHYnCn/6cL8qx/xmQD/68f8rCDLqmLXnC33ohDrmQf6+vj////Rnz/9rSHdmh/qmQr+ryXtmQXbmyTomQ3k38/cmiEJVN6mAAAAAXRSTlMAQObYZgAAAH9JREFUeF5lj+cKAzEMg2Vn3t6ru+//ksVNwqVUPwz+QJYFUWkm5smUiCoW2xK1dikgWvf5oK+OeV8BaCVL38tUBvDsBGybTMcvaEsnIGvwrnJQPXB3Obg9E2iaAK64xExKlvH3qIZnymM9MKrTofTf66ncQDSEcrF+3XV1qP8Bl2gGuNYIt7kAAAAASUVORK5CYII=)}.warning a{color:#514721}.info{background-color:#d5edf8;border:2px solid #92cae4;color:#205791;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAaVBMVEX///9PktVWouyawedRmN9Sm+Lg7Pedwuf///9Wou1VoOlSmuJTldZUn+hVn+mYwOZWoexvptzu9v1NkdTf7fxxp937/P5/sOCvzuzk7vhRmN5Xl9dmodpVoexqo9tRlNVVltbi7fhootuUx1cjAAAAAXRSTlMAQObYZgAAAH5JREFUeF5lj1cOA0EIQ83Usr239PsfMgKtlFHWH2CehMBgbX4imvyGU2tZVDFWRbkKmJc9RVHalxmANjyEnqvxgCPFtg9cW3pD25ip8PjU4sZRWv3AU4kLQdr9+APtC7eUAV5pbA6shqMMKHJAY35Xjb68fg13xu+GoZP4+AI3MwnTKJ+ruwAAAABJRU5ErkJggg==)}.info a{color:#205791}.msg-box{margin-bottom:20px;position:relative} 2 | -------------------------------------------------------------------------------- /example/msg/msg.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | message 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |

我是msg-box,错误信息

24 |
25 |
26 |

我是msg-box,成功信息

27 |
28 |
29 |

我是msg-box,警告信息

30 |
31 |
32 |

我是msg-box,说明信息

33 |
34 |
35 |
36 |
37 |
38 |
39 | 40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /example/msg/msg.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * message 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | $msgClassSwitch: true true true true; 8 | @import 'D:/sassCore/ext/message'; 9 | 10 | .msg-box{ 11 | margin-bottom: 20px; 12 | position: relative; 13 | } -------------------------------------------------------------------------------- /example/nav/nav.css: -------------------------------------------------------------------------------- 1 | #top_nav{margin-left:auto;margin-right:auto}.aside-nav li a{*zoom:1}.wrap-top-bar{background-color:#333;z-index:1010}#top_nav{line-height:36px;width:1000px}#top_nav li{text-transform:capitalize}#top_nav a{display:block;padding:0 15px;color:#ccc}#top_nav li a:hover,#top_nav .active a{color:#fff}.aside-nav{background-color:#ebebeb}.aside-nav li{border-bottom:1px solid #f8f8f8}.aside-nav li:last-child{border-bottom:none}.aside-nav li a{display:block;line-height:30px;color:#333;padding:0 10px}.aside-nav li a:hover,.aside-nav .active a{background-color:#0078e7;color:#fff}#nav{background-color:#ebebeb;line-height:40px}#nav li{border-right:1px solid #f8f8f8}#nav li a{color:#333;width:120px;text-align:center;display:block}#nav li a:hover,#nav .active a{background-color:#0078e7;color:#fff} 2 | -------------------------------------------------------------------------------- /example/nav/nav.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | nav 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 28 |
29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 |
37 |
38 | 49 |
50 |
51 |
52 |
53 | 54 |
55 | 56 | -------------------------------------------------------------------------------- /example/nav/nav.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * nav scss 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/nav'; 8 | 9 | -------------------------------------------------------------------------------- /example/paging/paging.css: -------------------------------------------------------------------------------- 1 | .paging{margin:0 0 20px;text-align:center}.paging ul{display:inline-block;*display:inline;*zoom:1}.paging li{margin:0 5px;float:left;display:inline}.paging .active span,.paging .disabled span,.paging a{float:left;display:inline;padding:0 8px;line-height:24px;height:24px;text-decoration:none}.paging a{color:#333;background-color:#dedede}.paging a:hover{text-decoration:none;color:#fff;background-color:#0078e7}.paging .active span{background-color:#0078e7;color:#fff}.paging .disabled span{background-color:#e6e6e6 !important;color:#ababab !important;cursor:not-allowed !important}.paging-left{text-align:left}.paging-right{text-align:right}.paging-brief{text-align:right;height:30px;line-height:30px}.paging-brief a{text-align:center;padding:0 10px;color:#fff;background-color:#0078e7;display:inline-block;*display:inline;*zoom:1}.paging-brief a:hover{background-color:#006bce}.paging-brief .prev{float:left;display:inline} 2 | -------------------------------------------------------------------------------- /example/paging/paging.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | paging 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |

默认居中

23 |
24 |
    25 | 26 |
  • 1
  • 27 |
  • ...
  • 28 |
  • 7
  • 29 |
  • 8
  • 30 |
  • 9
  • 31 |
  • ...
  • 32 |
  • 10
  • 33 | 34 |
35 |
36 |

居左

37 |
38 |
    39 | 40 |
  • 1
  • 41 |
  • ...
  • 42 |
  • 7
  • 43 |
  • 8
  • 44 |
  • 9
  • 45 |
  • ...
  • 46 |
  • 10
  • 47 | 48 |
49 |
50 |

居右

51 |
52 |
    53 | 54 |
  • 1
  • 55 |
  • ...
  • 56 |
  • 7
  • 57 |
  • 8
  • 58 |
  • 9
  • 59 |
  • ...
  • 60 |
  • 10
  • 61 | 62 |
63 |
64 |

简洁版

65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 |
73 |
74 | 75 |
76 | 77 | 78 | -------------------------------------------------------------------------------- /example/paging/paging.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * pager nav scss 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/paging'; -------------------------------------------------------------------------------- /example/progress/progress.css: -------------------------------------------------------------------------------- 1 | .progress{border:1px solid #ccc;padding:2px;height:18px}.progress .progress-percent{display:block;width:50%;height:100%;background-color:#0078e7;background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.3) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.3) 50%,rgba(255,255,255,0.3) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.3) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.3) 50%,rgba(255,255,255,0.3) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.3) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.3) 50%,rgba(255,255,255,0.3) 75%,transparent 75%,transparent);background-size:50px 50px}.progress,.progress .progress-percent{border-radius:13px}.progress{margin-bottom:20px} 2 | -------------------------------------------------------------------------------- /example/progress/progress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | progress 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /example/progress/progress.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * progress 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/progress'; 8 | 9 | .progress{ 10 | margin-bottom: $baseGap; 11 | } -------------------------------------------------------------------------------- /example/pub/asidenav-basic-css-block.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 11 |
12 |
-------------------------------------------------------------------------------- /example/pub/asidenav-common-design-block.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 19 |
20 |
-------------------------------------------------------------------------------- /example/pub/asidenav-js-block.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 12 |
13 |
-------------------------------------------------------------------------------- /example/pub/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/pub/head-cssjs.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/pub/meta.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /example/pub/top-bar.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 13 | 14 |
15 |
-------------------------------------------------------------------------------- /example/rank/rank.css: -------------------------------------------------------------------------------- 1 | .rank-list .title-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-list li{border-bottom:1px dashed #ccc;padding-top:10px;padding-bottom:10px}.rank-list{font-size:12px}.rank-list li{list-style:none outside none;text-align:right;margin-left:0}.rank-list li.last,.rank-list li:last-child{border-bottom:none}.rank-list i{float:left;display:inline;font-style:normal;text-align:center;background-color:#ccc;overflow:hidden;margin-right:6px;width:16px;height:18px}.rank-list .rank-1st i,.rank-list .rank-2nd i,.rank-list .rank-3rd i{color:#fff}.rank-list .rank-1st i{background-color:#FA4D11}.rank-list .rank-2nd i{background-color:#FA8411}.rank-list .rank-3rd i{background-color:#FAC011}.rank-list .title-link{float:left;display:inline;text-align:left;width:160px} 2 | -------------------------------------------------------------------------------- /example/rank/rank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | rank 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
    23 |
  1. 24 | 1 25 | 梦幻飞仙传奇梦幻飞仙传奇 26 | 6325 27 |
  2. 28 |
  3. 29 | 2 30 | 梦幻飞仙传奇梦幻飞仙传奇 31 | 251632 32 |
  4. 33 |
  5. 34 | 3 35 | 梦幻飞仙传奇梦幻飞仙传奇 36 | 2515632 37 |
  6. 38 |
  7. 39 | 4 40 | 梦幻飞仙传奇梦幻飞仙传奇 41 | 2515 42 |
  8. 43 |
  9. 44 | 5 45 | 梦幻飞仙传奇梦幻飞仙传奇 46 | 2515632 47 |
  10. 48 |
  11. 49 | 6 50 | 梦幻飞仙传奇梦幻飞仙传奇 51 | 2515632 52 |
  12. 53 |
  13. 54 | 7 55 | 梦幻飞仙传奇梦幻飞仙传奇 56 | 2515632 57 |
  14. 58 |
  15. 59 | 8 60 | 梦幻飞仙传奇梦幻飞仙传奇 61 | 2515632 62 |
  16. 63 |
  17. 64 | 9 65 | 梦幻飞仙传奇梦幻飞仙传奇 66 | 2515632 67 |
  18. 68 |
  19. 69 | 10 70 | 梦幻飞仙传奇梦幻飞仙传奇 71 | 2515632 72 |
  20. 73 |
74 |
75 |
76 |
77 |
78 |
79 | 80 |
81 | 82 | 83 | -------------------------------------------------------------------------------- /example/rank/rank.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * rank 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/rank'; 8 | 9 | -------------------------------------------------------------------------------- /example/speak-list/images/img50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/speak-list/images/img50.jpg -------------------------------------------------------------------------------- /example/speak-list/speak-list.css: -------------------------------------------------------------------------------- 1 | .speak-item{*zoom:1}.speak-item:before,.speak-item:after{content:"";display:table}.speak-item:after{clear:both}.speak-item{padding-left:60px}.speak-item .speak-left{float:left;display:inline;margin-left:-60px}.speak-item .speak-left img{width:50px;height:50px}.speak-item .speak-right h3{line-height:1.3;margin-bottom:5px;font-weight:bold}.speak-item .speak-content{margin-bottom:10px} 2 | -------------------------------------------------------------------------------- /example/speak-list/speak-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | speak list 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | 26 | 27 |
28 |
29 |

青取之于蓝

30 |

故不登高山,不知天之高也;不临深溪,不知地之厚也;不闻先王之遗言,不知学问之大也。干、越、夷、貉之子,生而同声,长而异俗,教使之然也。诗曰:“嗟尔君子,无恒安息。靖共尔位,好是正直。神之听之,介尔景福。”神莫大于化道,福莫长于无祸。

31 |
32 | 33 | 34 |
35 | 36 | 37 | 38 |
39 |
40 |

青取之于蓝

41 |

故不登高山,不知天之高也;不临深溪,不知地之厚也;不闻先王之遗言,不知学问之大也。干、越、夷、貉之子,生而同声,长而异俗,教使之然也。诗曰:“嗟尔君子,无恒安息。靖共尔位,好是正直。神之听之,介尔景福。”神莫大于化道,福莫长于无祸。

42 |
43 |
44 |
45 |
46 |
47 |
48 | 49 | 50 | 51 |
52 |
53 |

青取之于蓝

54 |

故不登高山,不知天之高也;不临深溪,不知地之厚也;不闻先王之遗言,不知学问之大也。干、越、夷、貉之子,生而同声,长而异俗,教使之然也。诗曰:“嗟尔君子,无恒安息。靖共尔位,好是正直。神之听之,介尔景福。”神莫大于化道,福莫长于无祸。

55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | 65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /example/speak-list/speak-list.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * speak list 4 | * 评论或微博等信息列表 5 | * ------------------------------------------------- 6 | */ 7 | @import 'D:/sassCore/function'; 8 | @import 'D:/tobe/components/speakList'; 9 | -------------------------------------------------------------------------------- /example/steps/steps.css: -------------------------------------------------------------------------------- 1 | .steps-nav .steps-1st,.steps-2 .steps-1st,.steps-2 .steps-2nd,.steps-3 .steps-1st,.steps-3 .steps-2nd,.steps-3 .steps-3rd,.steps-nav-num .steps-1st{border-top-color:#51b148;color:#51b148}.steps-nav .steps-1st .dot,.steps-2 .steps-1st .dot,.steps-2 .steps-2nd .dot,.steps-3 .steps-1st .dot,.steps-3 .steps-2nd .dot,.steps-3 .steps-3rd .dot,.steps-nav-num .steps-1st .dot{border-color:#51b148}.steps-nav{padding-top:3px;margin-bottom:20px}.steps-nav li{width:33.33333%;text-align:center;border-top:3px double #ccc;position:relative}.steps-nav li .dot{background-color:#fff;border:1px solid #ccc;position:absolute;left:50%;margin-left:-5px;margin-top:-8px;top:0;width:10px;height:10px;overflow:hidden;font-size:0;border-radius:6px}.steps-nav li strong{display:block;margin-top:15px}.steps-nav-num{padding-top:9px;padding-bottom:9px;margin-bottom:20px}.steps-nav-num li{width:33.33333%;text-align:center;border-top:3px double #ccc;position:relative}.steps-nav-num li .dot{background-color:#fff;border:1px solid #ccc;position:absolute;top:0;left:50%;margin-left:-10px;margin-top:-13px;width:21px;height:21px;border-radius:50%} 2 | -------------------------------------------------------------------------------- /example/steps/steps.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * steps 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/steps'; 8 | 9 | 10 | // 数字类 11 | //------------------------- 12 | .steps-nav-num{ 13 | padding-top: 9px; 14 | padding-bottom: 9px; 15 | margin-bottom:$baseGap; 16 | 17 | li{ 18 | width: 100% / $stepsNum; 19 | text-align: center; 20 | border-top:3px double nth($stepsDotBorderColor,1); 21 | position: relative; 22 | 23 | .dot{ 24 | background-color: #fff; 25 | border:1px solid nth($stepsDotBorderColor,1); 26 | position: absolute; 27 | top:0; 28 | left: 50%; 29 | margin-left: -10px; 30 | margin-top: -13px; 31 | width: $baseFontSize * $baseLineHeight; 32 | height: $baseFontSize * $baseLineHeight; 33 | @include border-radius(50%); 34 | 35 | } 36 | } 37 | .steps-1st{ 38 | @extend %steps-on; 39 | } 40 | } -------------------------------------------------------------------------------- /example/table/table.css: -------------------------------------------------------------------------------- 1 | .table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px}.table thead th{text-align:left}.table-fixed{table-layout:fixed}.table-border th,.table-border td{border:1px solid #ccc}.table-list th{background-color:#0078e7;color:#fff;font-weight:normal}.table-list td{border-bottom:1px dashed #ccc}.table-list tbody>tr:nth-child(even)>td{background-color:#f9f9f9}.table-list tbody tr:hover>td{background-color:#e9f5ff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-line{_border-bottom:1px solid #ccc}.table-line th,.table-line td{border-top:1px solid #ccc}.table-line thead:first-child tr:first-child th,.table-line thead:first-child tr:first-child td{border-top:0}.table-radius{border-top:1px solid #ccc;border-left:1px solid #ccc;border-collapse:separate;*border-collapse:collapse;border-radius:5px}.table-radius th,.table-radius td{border-right:1px solid #ccc;border-bottom:1px solid #ccc}.table-radius thead:first-child tr:first-child>th:first-child,.table-radius tbody:first-child tr:first-child>td:first-child,.table-radius tbody:first-child tr:first-child>th:first-child{border-top-left-radius:5px}.table-radius thead:first-child tr:first-child>th:last-child,.table-radius tbody:first-child tr:first-child>td:last-child,.table-radius tbody:first-child tr:first-child>th:last-child{border-top-right-radius:5px}.table-radius thead:last-child tr:last-child>th:first-child,.table-radius tbody:last-child tr:last-child>td:first-child,.table-radius tbody:last-child tr:last-child>th:first-child,.table-radius tfoot:last-child tr:last-child>td:first-child,.table-radius tfoot:last-child tr:last-child>th:first-child{border-bottom-left-radius:5px}.table-radius thead:last-child tr:last-child>th:last-child,.table-radius tbody:last-child tr:last-child>td:last-child,.table-radius tbody:last-child tr:last-child>th:last-child,.table-radius tfoot:last-child tr:last-child>td:last-child,.table-radius tfoot:last-child tr:last-child>th:last-child{border-bottom-right-radius:5px}.table-radius tfoot+tbody:last-child tr:last-child td:first-child{border-bottom-left-radius:5px}.table-radius tfoot+tbody:last-child tr:last-child td:last-child{border-bottom-right-radius:5px}.table-radius caption+thead tr:first-child th:first-child,.table-radius caption+tbody tr:first-child td:first-child,.table-radius colgroup+thead tr:first-child th:first-child,.table-radius colgroup+tbody tr:first-child td:first-child{border-top-left-radius:5px}.table-radius caption+thead tr:first-child th:last-child,.table-radius caption+tbody tr:first-child td:last-child,.table-radius colgroup+thead tr:first-child th:last-child,.table-radius colgroup+tbody tr:first-child td:last-child{border-top-right-radius:5px}.table-striped tbody>tr:nth-child(even)>td{background-color:#f9f9f9}.table-hover tbody tr:hover>td{background-color:#e9f5ff}.table-col-th th,.table-col-th td{border:1px solid #ccc}.table-col-th th{background-color:#f4f4f4;width:80px;vertical-align:middle}.table tr.tr-success td{background-color:#e6efc2}.table tr.tr-error td{background-color:#fbe3e4}.table tr.tr-warning td{background-color:#fff6bf}.table tr.tr-info td{background-color:#d5edf8}.table-hover tr.tr-success:hover td{background-color:#deeaae}.table-hover tr.tr-error:hover td{background-color:#f8cdce}.table-hover tr.tr-warning:hover td{background-color:#fff2a6}.table-hover tr.tr-info:hover td{background-color:#bfe4f4} 2 | -------------------------------------------------------------------------------- /example/table/table.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * table scss 4 | * ------------------------------------------------- 5 | */ 6 | $tableListSwitch: true; 7 | $tableColThSwitch: true; 8 | $tableRadiusSwitch: true; 9 | $tableLineSwitch: true; 10 | $tableStripedSwitch: true; 11 | $tableHoverSwitch: true; 12 | $tableCondensedSwitch: true; 13 | $tableStatusSwitch: true; 14 | 15 | @import 'D:/sassCore/function'; 16 | @import 'D:/sassCore/ext/table'; 17 | -------------------------------------------------------------------------------- /example/tabs/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs-primary,.tabs-color,.tabs-border{*zoom:1}.tabs-primary:before,.tabs-color:before,.tabs-border:before,.tabs-primary:after,.tabs-color:after,.tabs-border:after{content:"";display:table}.tabs-primary:after,.tabs-color:after,.tabs-border:after{clear:both}.tabs-primary{border-bottom:1px solid #ccc;font-size:16px;line-height:34px}.tabs-primary a{float:left;display:inline;padding:0 15px;border:1px solid #ccc;margin-bottom:-1px;margin-left:10px;color:#333;background-color:#fff;*position:relative;border-radius:5px 5px 0 0}.tabs-primary a.active{border-bottom-color:#fff;background-color:#fff;color:#0078e7}.tabs-primary a:hover{color:#0078e7}.tabs-color{border-top:2px solid #0078e7;border-right:1px solid #ccc;border-left:1px solid #ccc;background-color:#f5f5f5;font-size:14px;line-height:36px}.tabs-color a{float:left;display:inline;margin-right:1px;padding:0 20px;color:#333;text-align:center}.tabs-color a.active,.tabs-color a:hover{background-color:#0078e7;color:#fff}.tabs-color{border-radius:5px 5px 0 0}.tabs-color a:first-child{border-radius:5px 0 0 0}.tabs-border{border:1px solid #ccc;background-color:#f5f5f5;font-size:14px;line-height:34px}.tabs-border a{float:left;display:inline;border:1px solid #ccc;border-left:none;margin:-1px 0;padding:0 20px;color:#333;text-align:center;*position:relative}.tabs-border a.active{background-color:#fff;border-bottom-color:#fff;border-top-color:#0078e7;color:#0078e7}.tabs-border a:hover{color:#0078e7}.tabs-border{border-radius:5px 5px 0 0}.tabs-border a:first-child{border-radius:5px 0 0 0}.tabs-content-wrap{border:1px solid #ccc;border-top:none;padding:10px;border-radius:0 0 5px 5px} 2 | -------------------------------------------------------------------------------- /example/tabs/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tabs 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |

一级tabs

23 |

24 | 选项一 25 | 选项二 26 | 选项三 27 | 选项四 28 |

29 |

二级tabs

30 |

tabs-color

31 |

32 | 选项一 33 | 选项二 34 | 选项三 35 |

36 |
37 |
我是选项一内容
38 |
39 |

tabs-border

40 |

41 | 选项一 42 | 选项二 43 | 选项三 44 |

45 |
46 |
我是选项一内容
47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /example/tabs/tabs.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * tabs 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/tabs'; 8 | 9 | -------------------------------------------------------------------------------- /example/tags-filter/tags-filter.css: -------------------------------------------------------------------------------- 1 | .tags-filter-item{*zoom:1}.tags-filter-item:before,.tags-filter-item:after{content:"";display:table}.tags-filter-item:after{clear:both}.tags-filter-item .tags-content{*zoom:1}.tags-filter-item{padding-top:5px;padding-bottom:5px}.tags-filter-item .tags-label{float:left;display:inline;width:50px}.tags-filter-item .tags-content{overflow:hidden}.tags-filter-item .tags-content span{float:left;display:inline;margin-right:10px;padding:0 2px;cursor:pointer;white-space:nowrap;margin-bottom:5px}.tags-filter-item .tags-content span.active,.tags-filter-item .tags-content span:hover{background-color:#0078e7;color:#fff} 2 | -------------------------------------------------------------------------------- /example/tags-filter/tags-filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tags filter 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 区域: 25 |
26 | 不限海口(17) 27 |
28 |
29 |
30 | 月租: 31 |
32 | 不限80-100万100-120万120-150万150-200万200-300万 33 |
34 |
35 |
36 | 户型: 37 |
38 | 不限二居三居四居五居
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | 47 |
48 | 49 | 50 | -------------------------------------------------------------------------------- /example/tags-filter/tags-filter.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * tags filter 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/tagsFilter'; -------------------------------------------------------------------------------- /example/templates/sass/templates1.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | //重置变量 4 | $imgslideView: 1000px 340px; 5 | 6 | //import scss 7 | @import "D:/sassCore/base"; 8 | @import "D:/sassCore/ext/helper"; 9 | 10 | @import "D:/tobe/components/search"; 11 | @import "D:/tobe/components/layout"; 12 | @import "D:/tobe/components/nav"; 13 | @import "D:/tobe/components/imgslide"; 14 | @import "D:/tobe/components/col"; 15 | 16 | //header 17 | //----------------------------------------------------- 18 | #header{ 19 | position: relative; 20 | } 21 | #logo{ 22 | @include inline-block; 23 | margin:10px 0 15px; 24 | } 25 | //form-search 26 | .form-search-block{ 27 | position: absolute; 28 | right: 0; 29 | top:40px; 30 | .search-text{ 31 | width: 200px; 32 | } 33 | } 34 | 35 | //container 36 | //----------------------------------------------------- 37 | //col three 38 | .col-three{ 39 | img{ 40 | margin-bottom: 10px; 41 | } 42 | p{ 43 | line-height: 1.6; 44 | } 45 | .more{ 46 | font-family: $fontCn; 47 | margin-left: 5px; 48 | } 49 | } 50 | 51 | //footer 52 | //----------------------------------------------------- 53 | #footer{ 54 | border-top:1px solid $gray; 55 | padding: 20px 0; 56 | text-align: center; 57 | } -------------------------------------------------------------------------------- /example/templates/sass/templates2.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | //重置变量 4 | $navAWidth: 100px; 5 | $colThreeSwitch: false; 6 | 7 | //import scss 8 | @import "D:/sassCore/base"; 9 | @import "D:/sassCore/ext/helper"; 10 | 11 | @import "D:/tobe/components/layout"; 12 | @import "D:/tobe/components/search"; 13 | @import "D:/tobe/components/nav"; 14 | @import "D:/tobe/components/breadcrumb"; 15 | @import "D:/tobe/components/imgtitle"; 16 | @import "D:/tobe/components/paging"; 17 | @import "D:/tobe/components/col"; 18 | 19 | //base 20 | //----------------------------------------------------- 21 | .wrap-header, 22 | .wrap-footer{ 23 | background-color: #333; 24 | color:#eee; 25 | } 26 | 27 | //header 28 | //----------------------------------------------------- 29 | #header{ 30 | position: relative; 31 | } 32 | #logo{ 33 | @include inline-block; 34 | margin:10px 0 15px; 35 | } 36 | 37 | //nav 38 | //----------------------------------------------------- 39 | .wrap-nav{ 40 | background-color: nth($navBgColor,1); 41 | position: relative; 42 | } 43 | #nav{ 44 | width:getWidth(12); 45 | @extend %center-block; 46 | position: relative; 47 | } 48 | //form-search 49 | .form-search-block{ 50 | position: absolute; 51 | right: 0; 52 | top:0; 53 | } 54 | 55 | //footer 56 | //----------------------------------------------------- 57 | #footer{ 58 | padding: 20px 0; 59 | text-align: center; 60 | .footer-columns{ 61 | padding-bottom: 20px; 62 | border-bottom:1px solid #000; 63 | text-align: left; 64 | 65 | .col-content{ 66 | color: #ccc; 67 | } 68 | } 69 | .col-four{ 70 | margin-bottom: 0; 71 | } 72 | .copyright{ 73 | padding-top: 20px; 74 | border-top:1px solid #666; 75 | } 76 | } -------------------------------------------------------------------------------- /example/templates/sass/templates3.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | //重置变量 4 | $navAWidth: 100px; 5 | $imgtextHImgSize: 400px 300px; 6 | $titleListTitleWidth: 200px; 7 | $navHeight: 34px; 8 | 9 | //import scss 10 | @import "D:/sassCore/base"; 11 | @import "D:/sassCore/ext/helper"; 12 | @import "D:/sassCore/ext/btn"; 13 | @import "D:/sassCore/ext/typography"; 14 | 15 | @import "D:/tobe/components/layout"; 16 | @import "D:/tobe/components/search"; 17 | @import "D:/tobe/components/nav"; 18 | @import "D:/tobe/components/hdtitle"; 19 | @import "D:/tobe/components/titlelist"; 20 | @import "D:/tobe/components/breadcrumb"; 21 | @import "D:/tobe/components/imgtextH"; 22 | @import "D:/tobe/components/tabs"; 23 | @import "D:/tobe/components/search"; 24 | 25 | //base 26 | //----------------------------------------------------- 27 | .wrap-header, 28 | .wrap-footer{ 29 | background-color: #333; 30 | color:#eee; 31 | } 32 | .aside .block-bd{ 33 | padding: 10px; 34 | } 35 | //header 36 | //----------------------------------------------------- 37 | #header{ 38 | position: relative; 39 | } 40 | #logo{ 41 | @include inline-block; 42 | margin:10px 0 15px; 43 | } 44 | #nav{ 45 | @include border-radius(5px); 46 | @extend %center-block; 47 | position: absolute; 48 | right: 10px; 49 | top:10px; 50 | li:first-child a{ 51 | @include border-radius(5px 0 0 5px); 52 | } 53 | li:last-child{ 54 | border-right:none; 55 | a{ 56 | @include border-radius(0 5px 5px 0); 57 | } 58 | } 59 | } 60 | //form-search 61 | .form-search-block{ 62 | position: absolute; 63 | right: 10px; 64 | bottom:20px; 65 | } 66 | //aside 67 | //----------------------------------------------------- 68 | .aside{ 69 | .inner-aside{ 70 | border:1px solid darken($grayLight,5%); 71 | background-color: #FFF; 72 | @include border-radius(5px); 73 | } 74 | } 75 | 76 | //container 77 | //----------------------------------------------------- 78 | .imgtext-h{ 79 | margin-bottom: 20px; 80 | } 81 | 82 | //footer 83 | //----------------------------------------------------- 84 | .wrap-footer{ 85 | padding-bottom: 10px; 86 | } 87 | #footer{ 88 | padding: 20px 0; 89 | text-align: center; 90 | } -------------------------------------------------------------------------------- /example/templates/sass/templates4.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | //重置变量 4 | $stepsStyleSwitch: false; 5 | $formMsgSwitch: true; 6 | $formHorizontalSwitch: true; 7 | $searchRounded: true; 8 | 9 | //import scss 10 | @import "D:/sassCore/base"; 11 | @import "D:/sassCore/ext/btn"; 12 | @import "D:/sassCore/ext/message"; 13 | @import "D:/sassCore/ext/helper"; 14 | @import "D:/sassCore/ext/form"; 15 | @import "D:/tobe/components/layout"; 16 | @import "D:/tobe/components/nav"; 17 | @import "D:/tobe/components/search"; 18 | @import "D:/tobe/components/steps"; 19 | 20 | //base 21 | //----------------------------------------------------- 22 | .wrap-header, 23 | .wrap-footer{ 24 | background-color: #eee; 25 | } 26 | //top nav 27 | //----------------------------------------------------- 28 | #top_nav{ 29 | position: relative; 30 | } 31 | //form-search 32 | .form-search-block{ 33 | position: absolute; 34 | right: 0; 35 | top:4px; 36 | // @extend %search-form-rounded; 37 | } 38 | 39 | //header 40 | //----------------------------------------------------- 41 | #header{ 42 | position: relative; 43 | } 44 | #logo{ 45 | @include inline-block; 46 | margin:10px 0 15px; 47 | } 48 | 49 | //main 50 | //----------------------------------------------------- 51 | #register_page{ 52 | h1, 53 | .form-item{ 54 | margin-bottom: $baseGap; 55 | } 56 | .form{ 57 | width: 600px; 58 | @extend %center-block; 59 | } 60 | } 61 | 62 | //footer 63 | //----------------------------------------------------- 64 | #footer{ 65 | padding: 20px 0; 66 | text-align: center; 67 | } -------------------------------------------------------------------------------- /example/templates/templates4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | template4 8 | 9 | 10 | 11 |
12 |
13 |
14 | 23 |
24 |
25 | 26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
    37 |
  • 38 | 1 39 |
  • 40 |
  • 41 | 2 42 |
  • 43 |
  • 44 | 3 45 |
  • 46 |
47 |
48 |

基本信息

49 |
50 |
51 | 52 |
53 |
54 |
55 | 56 |
请输入正确的邮箱格式
57 |
58 |
59 | 60 |
61 |
62 |
63 | 64 |
65 | 66 | 67 |
68 |
69 |
70 | 71 |
72 |
73 |
74 |
75 |
76 |
77 | 83 |
84 | 85 | -------------------------------------------------------------------------------- /example/titlelist/images/icon-circle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/titlelist/images/icon-circle.gif -------------------------------------------------------------------------------- /example/titlelist/titlelist.css: -------------------------------------------------------------------------------- 1 | .title-list .title-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-list li{line-height:25.2px}.title-list .title-link{display:block;width:300px}.title-left li{text-align:right}.title-left .title-link{float:left;display:inline;width:300px;text-align:left}.title-list li{background:url("images/icon-circle.gif") no-repeat 0;padding-left:12px} 2 | -------------------------------------------------------------------------------- /example/titlelist/titlelist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | titlelist 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 46 |
47 | 48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /example/titlelist/titlelist.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * titlelist 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/titlelist'; 8 | -------------------------------------------------------------------------------- /example/tooltip/tooltip.css: -------------------------------------------------------------------------------- 1 | .tip-arrow-top,.tip-arrow-right,.tip-arrow-bottom,.tip-arrow-left{font-style:normal;position:absolute;width:0;height:0;overflow:hidden}.tooltip-box{border:1px solid #ccc;background-color:#fff;position:absolute;z-index:1020}.tooltip-box .tip-content{padding:10px}.tip-arrow-top{border-bottom:8px solid #ccc;border-left:8px dashed transparent;border-right:8px dashed transparent;top:-8px;left:10px}.tip-arrow-right{border-left:8px solid #ccc;border-top:8px dashed transparent;border-bottom:8px dashed transparent;right:-8px;top:10px}.tip-arrow-bottom{border-top:8px solid #ccc;border-left:8px dashed transparent;border-right:8px dashed transparent;bottom:-8px;left:10px}.tip-arrow-left{border-right:8px solid #ccc;border-top:8px dashed transparent;border-bottom:8px dashed transparent;left:-8px;top:10px}.tooltip-box{position:relative;margin-bottom:20px;width:300px} 2 | -------------------------------------------------------------------------------- /example/tooltip/tooltip.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tooltip 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 |

假舆马者,非利足也,而致千里;假舟楫者,非能水也,而绝江河。君子生非异也,善假于物也。

26 |
27 |
28 |
29 | 30 |
31 |

假舆马者,非利足也,而致千里;假舟楫者,非能水也,而绝江河。君子生非异也,善假于物也。

32 |
33 |
34 |
35 | 36 |
37 |

假舆马者,非利足也,而致千里;假舟楫者,非能水也,而绝江河。君子生非异也,善假于物也。

38 |
39 |
40 |
41 | 42 |
43 |

假舆马者,非利足也,而致千里;假舟楫者,非能水也,而绝江河。君子生非异也,善假于物也。

44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /example/tooltip/tooltip.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * tooltip 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/tobe/components/tooltip'; 8 | 9 | .tooltip-box{ 10 | position: relative; 11 | margin-bottom: 20px; 12 | width: 300px; 13 | } -------------------------------------------------------------------------------- /example/typo/images/w3cplus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/example/typo/images/w3cplus.jpg -------------------------------------------------------------------------------- /example/typo/typo.css: -------------------------------------------------------------------------------- 1 | blockquote{padding:0 0 0 15px;margin:0 0 10px;border-left:3px solid #ccc}blockquote small{font-size:11.9px;display:block;line-height:1.5;color:#999}blockquote small:before{content:'\2014 \00A0'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:10px;font-style:normal;line-height:1.5}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}.article{line-height:1.6}.article h1,.article h2,.article h3,.article h4,.article h5,.article h6{line-height:1.3;margin-bottom:10px}.article ul,.article ol{margin-left:25px;list-style-type:disc}.article ol{list-style-type:decimal}.article p,.article ul,.article ol,.article dl{margin-bottom:10px}.article ul ul,.article ul ol,.article ol ol,.article ol ul{margin-bottom:0}.article dt{font-weight:bold;line-height:1.8}.article dd{margin-left:2em}.article img{margin-bottom:10px;border:1px solid #ccc;padding:2px}.article .fr img{margin-left:10px}.article .fl img{margin-right:10px} 2 | -------------------------------------------------------------------------------- /example/typo/typo.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * typo 4 | * ------------------------------------------------- 5 | */ 6 | @import 'D:/sassCore/function'; 7 | @import 'D:/sassCore/ext/typography'; -------------------------------------------------------------------------------- /example/yourself/componentName.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 自定义组件 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 |
16 |

作者:Your name

17 |
18 |
19 |
20 |
21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /example/yourself/componentName.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // componentName scss 4 | //----------------------------------------------------- 5 | 6 | @import "D:/tobe/function"; 7 | //@import "D:/tobe/custom/componentName"; 8 | -------------------------------------------------------------------------------- /sass/global.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* ------------------------------------------------- 3 | * global scss 4 | * ------------------------------------------------- 5 | */ 6 | 7 | @import "D:/sassCore/base"; 8 | @import "D:/sassCore/ext/helper"; 9 | @import "D:/tobe/components/layout"; 10 | @import "D:/tobe/components/nav"; 11 | 12 | #top_nav{ 13 | position: relative; 14 | .others-link{ 15 | position: absolute; 16 | right: 0; 17 | top: 0; 18 | background-color: $primary; 19 | a{ 20 | @include float; 21 | color: #fff; 22 | &:hover{ 23 | background-color: darken($primary,5%); 24 | } 25 | } 26 | } 27 | } 28 | 29 | .wrap-footer{ 30 | background-color: $grayLight; 31 | } 32 | #footer{ 33 | text-align: center; 34 | padding: 20px 0; 35 | } 36 | -------------------------------------------------------------------------------- /sass/style.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* ------------------------------------------------- 3 | * style scss 4 | * ------------------------------------------------- 5 | */ 6 | 7 | @import "D:/sassCore/function"; 8 | @import 'D:/tobe/components/col'; 9 | @import 'D:/tobe/components/imgstyle'; 10 | 11 | //index 12 | //-------------------------- 13 | .wrap-featured{ 14 | background-color: $grayLight; 15 | } 16 | #featured{ 17 | @extend %center-block; 18 | width:getWidth(12); 19 | padding: 20px 0; 20 | text-align: center; 21 | 22 | h1{ 23 | font-size: 48px; 24 | } 25 | p{ 26 | font-size: 20px; 27 | } 28 | } 29 | .col-four{ 30 | h2{ 31 | font-size: 20px; 32 | } 33 | font-size:16px; 34 | line-height:1.6; 35 | } 36 | .start-zone{ 37 | text-align: center; 38 | 39 | p{ 40 | @include inline-block; 41 | // @include border-radius(10px); 42 | font-size: 16px; 43 | line-height: 2; 44 | padding: 10px 30px 10px 10px; 45 | background-color: $primary; 46 | color: #fff; 47 | margin-right: -10px; 48 | vertical-align: middle; 49 | 50 | } 51 | .link-start{ 52 | @include inline-block; 53 | background-color: $orange; 54 | color: #fff; 55 | padding: 0 10px; 56 | font-size: 20px; 57 | line-height: 2; 58 | position: relative; 59 | vertical-align: middle; 60 | 61 | &:after{ 62 | @include triangle(right, 25px, $orange); 63 | position: absolute; 64 | right: -25px; 65 | top: -5px; 66 | } 67 | 68 | &:hover{ 69 | background-color: darken($orange,5%); 70 | &:after{ 71 | border-left-color: darken($orange,5%); 72 | } 73 | } 74 | 75 | } 76 | } 77 | 78 | // template 79 | //-------------------------- 80 | .col-four{ 81 | img{ 82 | @extend %img-border; 83 | width: getWidth(3,true,6px); 84 | } 85 | } 86 | .btn{ 87 | @extend %simple-btn; 88 | margin-right: 10px; 89 | } 90 | pre{ 91 | border:3px solid darken($grayLight,5%); 92 | @include border-radius(3px); 93 | padding: 10px; 94 | } 95 | 96 | //begin 97 | //-------------------------- 98 | .col-two{ 99 | @extend %col-span; 100 | .col{ 101 | width:getWidth(6); 102 | } 103 | } 104 | .col-begin{ 105 | .col{ 106 | background-color: $grayLight; 107 | } 108 | h2{ 109 | background-color: $primary; 110 | color: #fff; 111 | padding-left: 10px; 112 | line-height: 36px; 113 | } 114 | .col-content{ 115 | padding: 10px; 116 | } 117 | } -------------------------------------------------------------------------------- /tobe/_base.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // base scss 4 | // 提供所有的基础功能包括:变量设置,css3前缀填充,@media,基础mixin,栅格化grid,reset样式 5 | // 默认会输出reset样式一份 6 | //----------------------------------------------------- 7 | 8 | //----------------------------------------------------- 9 | // author: 结一 (http://weibo.com/marvin1023) 10 | // version: 3.0 11 | // time: 2014-02-08 12 | // url: https://github.com/marvin1023/sassCore/ http://tobe.w3cplus.com/ 13 | //----------------------------------------------------- 14 | 15 | 16 | // 导入core中的基础文件 17 | //----------------------------------------------------- 18 | @import "core/setting"; 19 | @import "core/css3"; 20 | @import "core/media-queries"; 21 | @import "core/mixin"; 22 | @import "core/grid"; 23 | @import "core/reset"; 24 | -------------------------------------------------------------------------------- /tobe/_function.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // function scss 4 | // 提供所有的基础功能包括:变量设置,css3前缀填充,@media,基础mixin,栅格化grid 5 | // 默认不会解析出任何样式 6 | //----------------------------------------------------- 7 | 8 | //----------------------------------------------------- 9 | // author: 结一 (http://weibo.com/marvin1023) 10 | // version: 3.0 11 | // time: 2014-02-08 12 | // url: https://github.com/marvin1023/sassCore/ http://tobe.w3cplus.com/ 13 | //----------------------------------------------------- 14 | 15 | 16 | // 导入所有功能类相关文件 17 | //----------------------------------------------------- 18 | @import "core/setting"; 19 | @import "core/css3"; 20 | @import "core/media-queries"; 21 | @import "core/mixin"; 22 | @import "core/grid"; -------------------------------------------------------------------------------- /tobe/components/_accordion.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // accordion scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 如果要支持ie6请注意: 8 | // ie6不支持兄弟元素选择器,所以请用js来控制,见79行 9 | // 也不支持非a元素的hover效果,见32行 10 | 11 | 12 | // 变量 13 | //--------------------------------- 14 | $accordionHdHeight: 36px !default; //默认标题栏高度 15 | $accordionHdBgColor: darken($grayLight,4%) $primary !default; //标题背景色:默认色,展开色 16 | $accordionHdTextColor: #333 #fff !default; //标题文本色:默认色,展开色 17 | $accordionArrowColor: darken($grayLight,15%) #fff !default; //箭头颜色:默认色,展开色 18 | $accordionArrowSize: 8px !default; //箭头大小 19 | 20 | 21 | // 样式 22 | //--------------------------------- 23 | .accordion{ 24 | .accordion-hd{ 25 | background-color: nth($accordionHdBgColor,1); 26 | height: $accordionHdHeight; 27 | margin-bottom: 10px; 28 | cursor: pointer; 29 | @if $lte7{ 30 | _overflow:hidden; 31 | } 32 | 33 | &:hover{ 34 | background-color: darken(nth($accordionHdBgColor,2),5%); 35 | 36 | .accordion-title{ 37 | color:nth($accordionHdTextColor,2); 38 | } 39 | .accordion-arrow{ 40 | border-top-color:nth($accordionHdTextColor,2); 41 | } 42 | } 43 | } 44 | .accordion-title{ 45 | @include float; 46 | line-height: $accordionHdHeight; 47 | padding-left: 10px; 48 | color:nth($accordionHdTextColor,1); 49 | } 50 | .accordion-bd{ 51 | padding:0 10px; 52 | margin-bottom: 10px; 53 | display: none; 54 | } 55 | .accordion-arrow{ 56 | @include float(right); 57 | border-top:$accordionArrowSize solid nth($accordionArrowColor,1); 58 | border-left:$accordionArrowSize dashed transparent; 59 | border-right:$accordionArrowSize dashed transparent; 60 | width: 0; 61 | height: 0; 62 | margin: (($accordionHdHeight - $accordionArrowSize) / 2) 10px 0 0; 63 | cursor: pointer; 64 | font-size: 0; 65 | } 66 | .expanded{ 67 | background-color: nth($accordionHdBgColor,2); 68 | 69 | .accordion-title{ 70 | color: nth($accordionHdTextColor,2); 71 | } 72 | .accordion-arrow{ 73 | border-top:none; 74 | border-bottom:$accordionArrowSize solid nth($accordionArrowColor,2); 75 | 76 | @if $lte7{ 77 | _font-size: 0; 78 | } 79 | } 80 | & + .accordion-bd{ 81 | display: block; 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /tobe/components/_alert.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // alert scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 样式 8 | //--------------------------------- 9 | .alert-box{ 10 | position: absolute; 11 | z-index:$zindexAlert; 12 | 13 | .error, .warning, .success, .info{ 14 | @extend %inline-block; 15 | } 16 | } -------------------------------------------------------------------------------- /tobe/components/_avatar.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // avatar scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $avatarGutter: 10px !default; 10 | $avatarImgSize: 50px 50px !default; //图片的宽高 11 | $avatarItemWidth: 56px !default; //没有边框的情况下,宽度等于图片的宽度 12 | 13 | 14 | // mixin 15 | //--------------------------------- 16 | @mixin avatar-variables($itemWidth:$avatarItemWidth, $img:$avatarImgSize, $gutter:$avatarGutter){ 17 | margin-right:-$gutter; 18 | 19 | @if $lte7{ 20 | *padding-bottom: $gutter; 21 | } 22 | li,strong{ 23 | width: $itemWidth; 24 | } 25 | li{ 26 | margin:0 $gutter $gutter 0; 27 | } 28 | img{ 29 | width: nth($img,1); 30 | height: nth($img,2); 31 | padding: 2px; 32 | border:1px solid $gray; 33 | } 34 | } 35 | 36 | 37 | // 样式 38 | //--------------------------------- 39 | .avatar-list{ 40 | @extend %clearfix; 41 | @include avatar-variables; 42 | li{ 43 | @include float; 44 | } 45 | strong{ 46 | font-weight:normal; 47 | text-align:center; 48 | display:block; 49 | line-height:30px; 50 | @extend %ellipsis-basic; 51 | } 52 | } -------------------------------------------------------------------------------- /tobe/components/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // breadcrumb scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 样式 8 | //--------------------------------- 9 | #breadcrumb{ 10 | line-height:30px; 11 | margin-bottom: $baseGap; 12 | .divider{ 13 | font-family: $fontCn; 14 | margin: 0 8px; 15 | } 16 | } -------------------------------------------------------------------------------- /tobe/components/_carousel.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // carousel scss 4 | //----------------------------------------------------- 5 | 6 | 7 | //变量 8 | //--------------------------------- 9 | $carouselView: 920px !default;//视窗大小 10 | $carouselLiGutter: 20px !default;//li间距 11 | $carouselItemNums: 10 !default;//总共多少图片 12 | $carouselImg: 168px 150px !default;//图片大小,第一个为宽度,第二个为高度 13 | $carouselNavTextColor: $primary darken($primary,5%) !default;//前、后导航按钮文本颜色,第一个为默认的,第二个鼠标滑过的 14 | $carouselNavSize: 40px !default;//前、后导航按钮宽度 15 | 16 | 17 | //样式 18 | //--------------------------------- 19 | .carousel{ 20 | position:relative; 21 | @extend %zoom; 22 | 23 | .carousel-view{ 24 | width: $carouselView; 25 | margin:0 $carouselNavSize; 26 | overflow:hidden; 27 | 28 | ul{ 29 | width:(nth($carouselImg,1) + $carouselLiGutter) * $carouselItemNums; 30 | } 31 | } 32 | li{ 33 | @include float; 34 | text-align:center; 35 | margin-right:$carouselLiGutter; 36 | width:nth($carouselImg,1); 37 | position: relative; 38 | 39 | strong{ 40 | font-weight: normal; 41 | position: absolute; 42 | left: 0; 43 | top: nth($carouselImg,2) - 30px; 44 | width:nth($carouselImg,1); 45 | height:30px; 46 | line-height:30px; 47 | @extend %ellipsis-basic; 48 | width: 100%; 49 | @extend %bgcolor-alpha; 50 | 51 | } 52 | img{ 53 | width:nth($carouselImg,1); 54 | height:nth($carouselImg,2); 55 | } 56 | } 57 | 58 | //prev-next 59 | .prev-btn, 60 | .next-btn{ 61 | position:absolute; 62 | text-align: center; 63 | height:nth($carouselImg,2); 64 | line-height:nth($carouselImg,2); 65 | top:0; 66 | font-family: $fontCn; 67 | font-size: $carouselNavSize; 68 | font-weight: bold; 69 | color: nth($carouselNavTextColor,1); 70 | cursor:pointer; 71 | 72 | &:hover{ 73 | color: nth($carouselNavTextColor,2); 74 | } 75 | } 76 | .prev-btn{ 77 | left:10px; 78 | } 79 | .next-btn{ 80 | right:10px; 81 | } 82 | } -------------------------------------------------------------------------------- /tobe/components/_col.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // alert scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $colThreeSwitch: true !default;//是否开启三列等分样式 10 | $colFourSwitch: true !default;//是否开启四列等分样式 11 | 12 | // placeholder 13 | //--------------------------------- 14 | %col-span{ 15 | @extend %clearfix; 16 | margin-right: -$gridMarginValue; 17 | margin-bottom: $baseGap; 18 | 19 | .col{ 20 | @include float; 21 | margin-right: $gridMarginValue; 22 | } 23 | } 24 | 25 | 26 | // 样式 27 | //--------------------------------- 28 | @if $colThreeSwitch { 29 | .col-three{ 30 | @extend %col-span; 31 | .col{ 32 | width: getWidth(4); 33 | } 34 | } 35 | } 36 | @if $colFourSwitch { 37 | .col-four{ 38 | @extend %col-span; 39 | .col{ 40 | width: getWidth(3); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tobe/components/_gallery.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // gallery scss 4 | //----------------------------------------------------- 5 | 6 | 7 | //变量 8 | //--------------------------------- 9 | $galleryThumbNavBgColor: darken($grayLight,5%) $primary !default; 10 | $galleryThumbNavTextColor: #333 #fff !default; 11 | $galleryThumbImgBorderColor: $gray $primary !default; 12 | $galleryThumbImgNum: 8 !default; 13 | 14 | 15 | //样式 16 | //--------------------------------- 17 | .gallery{ 18 | width: 486px; 19 | margin-left: auto; 20 | margin-right: auto; 21 | .gallery-view{ 22 | margin-bottom: 10px; 23 | img{ 24 | width: 486px; 25 | height: 366px; 26 | vertical-align: middle; 27 | } 28 | 29 | .alpha-bar{ 30 | @extend %bgcolor-alpha; 31 | width: 100%; 32 | position: relative; 33 | height: 36px; 34 | line-height:36px; 35 | margin-top: -36px; 36 | .title{ 37 | @extend %ellipsis; 38 | @include float; 39 | width: 486px - 120px; 40 | margin-left: 10px; 41 | vertical-align: middle; 42 | } 43 | .num-calc{ 44 | @include float(right); 45 | width: 80px; 46 | text-align: right; 47 | margin-right: 10px; 48 | } 49 | } 50 | } 51 | .gallery-thumb{ 52 | position:relative; 53 | @extend %zoom; 54 | .gallery-thumb-view{ 55 | margin: 0 20px; 56 | width: 446px; 57 | overflow: hidden; 58 | } 59 | ul{ 60 | width: 114px * $galleryThumbImgNum; 61 | } 62 | li{ 63 | margin-right: 10px; 64 | img{ 65 | border:1px solid nth($galleryThumbImgBorderColor,1); 66 | padding: 1px; 67 | width: 100px; 68 | height: 75px; 69 | 70 | &:hover{ 71 | border-color: nth($galleryThumbImgBorderColor,2); 72 | } 73 | } 74 | } 75 | 76 | //prev-next 77 | .thumb-prev-btn, 78 | .thumb-next-btn{ 79 | position:absolute; 80 | text-align: center; 81 | height:79px;//= img height + padding + border 82 | line-height:79px; 83 | top:0; 84 | font-family: $fontCn; 85 | width: 10px; 86 | font-weight: bold; 87 | color: nth($galleryThumbNavTextColor,1); 88 | background-color: nth($galleryThumbNavBgColor,1); 89 | cursor:pointer; 90 | 91 | &:hover{ 92 | color: nth($galleryThumbNavTextColor,2); 93 | background-color: nth($galleryThumbNavBgColor,2); 94 | } 95 | } 96 | .thumb-prev-btn{ 97 | left:0; 98 | } 99 | .thumb-next-btn{ 100 | right:0; 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /tobe/components/_hdtitle.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // hdtitle scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $hdtitleLineHeight: 36px !default;//默认的行高为内容栏的行高 10 | $hdtitleLineHeightAside: 30px !default;//左右边栏的行高 11 | 12 | 13 | // placeholder selector 14 | //--------------------------------- 15 | %hdtitle{ 16 | @extend %clearfix; 17 | text-align: right; 18 | line-height: $hdtitleLineHeight; 19 | 20 | h2,h3{ 21 | @include float; 22 | line-height: $hdtitleLineHeight; 23 | margin-left: 10px; 24 | } 25 | .more{ 26 | font-family: $fontCn; 27 | margin-right: 10px; 28 | font-size: 12px; 29 | } 30 | } 31 | 32 | // 基础样式 33 | //--------------------------------- 34 | .hd-title, 35 | .block-hd{ 36 | @extend %hdtitle; 37 | background-color: darken($grayLight,4%); 38 | } 39 | 40 | // aside-block 边栏区块 41 | .aside-block .block-hd{ 42 | &, 43 | & h3{ 44 | line-height: $hdtitleLineHeightAside; 45 | } 46 | } -------------------------------------------------------------------------------- /tobe/components/_imgslide.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // imgslide scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $imgslideView: 745px 300px !default; //滚动图片的视窗大小,其实就是滚动图片的大小 10 | $imgslideItemNums: 4 !default; //多少个滚动项,默认为4个 11 | $imgslidePrevNextTextColor: #fff $blue !default; //前、后导航按钮文本颜色,第一个为默认的,第二个鼠标滑过的 12 | $imgslidePrevNextSize: 30px 60px !default; //前、后导航按钮大小 13 | 14 | // 开关 15 | $imgslideTitleSwitch: true !default; //是否显示标题 16 | $imgslidePrevNextSwitch: true !default; //是否输出前、后导航按钮 17 | $imgslideBulletSwitch: true !default; //是否输出子弹导航 18 | 19 | 20 | // 样式 21 | //--------------------------------- 22 | .imgslide{ 23 | position:relative; 24 | width: nth($imgslideView,1); 25 | margin-bottom: $baseGap; 26 | 27 | .slide-view{ 28 | overflow:hidden; 29 | &, 30 | & img{ 31 | width:nth($imgslideView,1); 32 | height:nth($imgslideView,2); 33 | } 34 | ul{ 35 | width:nth($imgslideView,1) * $imgslideItemNums; 36 | } 37 | li{ 38 | width:nth($imgslideView,1); 39 | } 40 | } 41 | 42 | //是否输出子弹导航 43 | @if $imgslideBulletSwitch{ 44 | .slide-bullet{ 45 | position:absolute; 46 | right:10px; 47 | bottom:10px; 48 | 49 | a{ 50 | @include float; 51 | font-family: Tahoma; 52 | font-size: 24px; 53 | line-height: 1; 54 | cursor:pointer; 55 | margin-right:5px; 56 | color: $grayLight; 57 | 58 | &.active, 59 | &:hover{ 60 | color:$blue; 61 | } 62 | } 63 | } 64 | } 65 | 66 | // 是否输出标题 67 | @if $imgslideTitleSwitch{ 68 | .slide-control{ 69 | position:absolute; 70 | left:0; 71 | bottom:0; 72 | height:36px; 73 | width:nth($imgslideView,1); 74 | line-height:36px; 75 | @extend %bgcolor-alpha; 76 | } 77 | .slide-title{ 78 | @extend %ellipsis; 79 | width:nth($imgslideView,1) - ($imgslideItemNums * 30); 80 | color:#fff; 81 | padding-left:10px; 82 | @include inline-block; 83 | } 84 | } 85 | 86 | // 是否输出前后导航按钮 87 | @if $imgslidePrevNextSwitch{ 88 | .prev-btn,.next-btn{ 89 | position:absolute; 90 | top:((nth($imgslideView,2) - nth($imgslidePrevNextSize,2)) / 2) - 18px; 91 | font-family: $fontCn; 92 | font-size: nth($imgslidePrevNextSize,1); 93 | font-weight: bold; 94 | width: nth($imgslidePrevNextSize,1); 95 | height: nth($imgslidePrevNextSize,2); 96 | line-height: nth($imgslidePrevNextSize,2); 97 | cursor:pointer; 98 | color: nth($imgslidePrevNextTextColor,1); 99 | text-align: center; 100 | @extend %bgcolor-alpha; 101 | 102 | &:hover{ 103 | color: nth($imgslidePrevNextTextColor,2); 104 | } 105 | } 106 | .prev-btn{ 107 | left:0; 108 | } 109 | .next-btn{ 110 | right:0; 111 | } 112 | } 113 | } -------------------------------------------------------------------------------- /tobe/components/_imgstyle.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // img style scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $imgStyleBorder: 1px solid $gray !default; 10 | $imgStylePadding: 2px !default; 11 | $imgStyleRadius: 8px !default; 12 | 13 | 14 | // mixin & placeholder 15 | //--------------------------------- 16 | @mixin img-border($border:$imgStyleBorder,$padding:$imgStylePadding){ 17 | padding: $padding; 18 | border: $border; 19 | } 20 | 21 | @mixin img-rounded($radius:$imgStyleRadius){ 22 | @include border-radius($radius); 23 | } 24 | 25 | %img-border{ 26 | @include img-border; 27 | } 28 | 29 | %img-rounded{ 30 | @include img-rounded; 31 | } 32 | 33 | %img-circle{ 34 | @include border-radius(50%) 35 | } -------------------------------------------------------------------------------- /tobe/components/_imgtextH.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // imgtextH scss 4 | //----------------------------------------------------- 5 | 6 | // 变量 7 | //--------------------------------- 8 | $imgtextHImgSize: 250px 160px !default;//默认图片大小 9 | $imgtextHGutter: 10px !default;//图片与文字的间距 10 | $imgtextHBlockImgSize: 50px 50px !default;//区块图文混排默认图片大小 11 | $imgtextHBlockGutter: 5px !default;//区块图文混排默认间距 12 | 13 | // 变量mixin 14 | //--------------------------------- 15 | @mixin imgtext-h-variables($img:$imgtextHImgSize,$gutter:$imgtextHGutter){ 16 | .img-left{ 17 | margin-right: $gutter; 18 | @if $lte7{ 19 | _margin-right: $gutter - 3px;//ie6 3px bug 20 | } 21 | img{ 22 | width:nth($img,1); 23 | height:nth($img,2); 24 | } 25 | } 26 | } 27 | 28 | // 左右混排基本样式 29 | //--------------------------------- 30 | %imgtext-base{ 31 | .img-left{ 32 | @include float; 33 | } 34 | 35 | .text-right{ 36 | overflow: hidden; 37 | @extend %zoom; 38 | h3{ 39 | line-height: 1.3; 40 | font-weight: bold; 41 | } 42 | } 43 | } 44 | 45 | // .img-left,.text-right 46 | .imgtext-h, 47 | .imgtext-h-list, 48 | .imgtext-h-block{ 49 | @extend %imgtext-base; 50 | } 51 | 52 | // 适用于单个图文左右混排 53 | //--------------------------------- 54 | .imgtext-h{ 55 | @extend %clearfix; 56 | @include imgtext-h-variables; 57 | .text-right{ 58 | h3{ 59 | margin-bottom: 10px; 60 | } 61 | } 62 | } 63 | 64 | // 适用于列表,罗列图文左右混排数据 65 | //--------------------------------- 66 | .imgtext-h-list{ 67 | @include imgtext-h-variables; 68 | li{ 69 | @extend %horizontal-line; 70 | @include min-height(nth($imgtextHImgSize,2)); 71 | } 72 | .text-right{ 73 | h3{ 74 | font-size:$baseFontSize + 2px; 75 | margin-bottom: 10px; 76 | } 77 | } 78 | } 79 | 80 | // 区块类列表 81 | //--------------------------------- 82 | .imgtext-h-block{ 83 | font-size: 12px; 84 | li{ 85 | @include min-height(nth($imgtextHBlockImgSize,2)); 86 | padding: 5px 0; 87 | } 88 | @include imgtext-h-variables($imgtextHBlockImgSize,$imgtextHBlockGutter); 89 | .text-right{ 90 | h3{ 91 | font-size: 12px; 92 | font-weight: normal; 93 | @extend %ellipsis-basic; 94 | width: 100%; 95 | } 96 | } 97 | } -------------------------------------------------------------------------------- /tobe/components/_imgtextV.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // imgtextV scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $imgtextVGutter: 20px !default; 10 | $imgtextVImgSize: 220px 130px !default;//图片的宽高 11 | $imgtextVItemWidth: 220px !default;//没有边框的情况下,宽度等于图片的宽度 12 | 13 | 14 | // 变量mixin 15 | //--------------------------------- 16 | @mixin imgtext-v-variables($itemWidth:$imgtextVItemWidth, $img:$imgtextVImgSize, $gutter:$imgtextVGutter){ 17 | margin-right:-$gutter; 18 | @if $lte7{ 19 | *padding-bottom: $gutter; 20 | } 21 | li{ 22 | width: $itemWidth; 23 | margin:0 $gutter $gutter 0; 24 | } 25 | img{ 26 | width:nth($img,1); 27 | height:nth($img,2); 28 | } 29 | } 30 | 31 | 32 | //默认样式 33 | //--------------------------------- 34 | .imgtext-v-list{ 35 | @extend %clearfix; 36 | @include imgtext-v-variables; 37 | li{ 38 | @include float; 39 | } 40 | .img-link{ 41 | display: block; 42 | } 43 | h3{ 44 | @extend %ellipsis-basic; 45 | width: 100%; 46 | font-weight:normal; 47 | line-height:30px; 48 | } 49 | } -------------------------------------------------------------------------------- /tobe/components/_imgtitle.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // imgtitle scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 图片,标题列表变量 8 | //--------------------------------- 9 | $imgtitleGutter: 20px !default; 10 | $imgtitleImgSize: 171px 150px !default;//图片的宽高 11 | $imgtitleItemWidth: 171px !default;//没有边框的情况下,宽度等于图片的宽度 12 | 13 | 14 | // 变量mixin 15 | //--------------------------------- 16 | @mixin imgtitle-variables($itemWidth:$imgtitleItemWidth, $img:$imgtitleImgSize, $gutter:$imgtitleGutter){ 17 | 18 | margin-right:-$gutter; 19 | 20 | @if $lte7{ 21 | *padding-bottom: $gutter; 22 | } 23 | li,strong{ 24 | width: $itemWidth; 25 | } 26 | li{ 27 | margin:0 $gutter $gutter 0; 28 | } 29 | img{ 30 | width: nth($img,1); 31 | height: nth($img,2); 32 | } 33 | } 34 | 35 | // 默认样式 36 | //--------------------------------- 37 | .imgtitle-list{ 38 | @extend %clearfix; 39 | @include imgtitle-variables; 40 | li{ 41 | @include float; 42 | } 43 | strong{ 44 | font-weight:normal; 45 | text-align:center; 46 | display:block; 47 | line-height:30px; 48 | @extend %ellipsis-basic; 49 | } 50 | } 51 | 52 | 53 | // 标题半透明背景,在上面的class基础上 54 | // 加上imgtitle-list-alpha class 55 | //--------------------------------- 56 | .imgtitle-list-alpha{ 57 | li{ 58 | position:relative; 59 | } 60 | strong{ 61 | top:nth($imgtitleImgSize,2) - 30px; 62 | width:nth($imgtitleImgSize,1) - 10px; 63 | position:absolute; 64 | left:0; 65 | color:#fff; 66 | padding:0 5px; 67 | @extend %bgcolor-alpha; 68 | } 69 | } -------------------------------------------------------------------------------- /tobe/components/_layout.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* ------------------------------------------------- 3 | * layout scss 4 | * ------------------------------------------------- 5 | */ 6 | 7 | .page{ 8 | min-height:100%; 9 | height:auto !important; 10 | height:100%; 11 | width:100%; 12 | min-width:getWidth(12); 13 | } 14 | #header,#container,#main,#footer,#top_nav{ 15 | width:getWidth(12); 16 | } 17 | #header,#container,#footer,#top_nav{ 18 | @extend %center-block; 19 | } 20 | #container{ 21 | padding:20px 0; 22 | } 23 | #main,#aside_second,#aside_first{ 24 | @include float; 25 | } 26 | @if $gridPercentSwitch{ 27 | #container{ 28 | width:getWidth(12,false); 29 | } 30 | #main{ 31 | @include column(12); 32 | } 33 | } 34 | //单边栏 35 | //---------------------------------------- 36 | 37 | //左边栏 38 | #aside_first{ 39 | @include column(3); 40 | 41 | @if not($gridPercentSwitch){ 42 | @include alpha; 43 | } 44 | } 45 | .layout-lm #main{ 46 | @include column(9); 47 | 48 | @if not($gridPercentSwitch){ 49 | @include omega; 50 | } 51 | } 52 | 53 | //右边栏 54 | #aside_second{ 55 | @include column(3); 56 | 57 | @if not($gridPercentSwitch){ 58 | @include omega; 59 | } 60 | } 61 | .layout-mr #main{ 62 | @include column(9); 63 | 64 | @if not($gridPercentSwitch){ 65 | @include alpha; 66 | } 67 | } 68 | 69 | 70 | //两边栏 71 | //---------------------------------------- 72 | .layout-lmr #main{ 73 | @include column(6); 74 | } -------------------------------------------------------------------------------- /tobe/components/_modal.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // modal scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $modalBoxSize: 500px 220px !default;//弹出框的大小:宽度,高度 10 | 11 | 12 | // 样式 13 | //--------------------------------- 14 | 15 | // overlay 16 | .overlay{ 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | width: 100%; 21 | height:100%; 22 | z-index:$zindexModal; 23 | 24 | @if $filter{ 25 | filter: progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#7F000000', endColorstr='#7F000000'); 26 | } 27 | background-color: rgba(0, 0, 0, 0.5); 28 | } 29 | 30 | // modal-box 31 | .modal-box{ 32 | position: absolute; 33 | top: 50%; 34 | left: 50%; 35 | width: nth($modalBoxSize,1); 36 | height:nth($modalBoxSize,2); 37 | margin-left: -(nth($modalBoxSize,1) / 2); 38 | margin-top: -(nth($modalBoxSize,2) / 2); 39 | border:2px solid $gray; 40 | z-index:$zindexModal + 5; 41 | background-color: #FFF; 42 | 43 | .modal-hd, 44 | .modal-bd, 45 | .modal-ft{ 46 | padding: 0 15px; 47 | } 48 | 49 | .modal-hd{ 50 | height:36px; 51 | text-align: right; 52 | 53 | h3{ 54 | @include float; 55 | line-height: 36px; 56 | font-weight: bold; 57 | } 58 | border-bottom:1px solid $gray; 59 | } 60 | .modal-bd{ 61 | margin: 15px 0; 62 | } 63 | .modal-ft{ 64 | text-align: center; 65 | padding: 10px 15px; 66 | .btn{ 67 | margin-left: 20px; 68 | } 69 | } 70 | .modal-del{ 71 | @include inline-block; 72 | padding:0 5px; 73 | cursor: pointer; 74 | font-size: 30px; 75 | line-height: 36px; 76 | height: 36px; 77 | margin-right: -10px; 78 | 79 | &:hover{ 80 | background-color: $grayLight; 81 | @include border-radius(6px); 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /tobe/components/_nav.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // nav scss 4 | //----------------------------------------------------- 5 | 6 | // 开关 7 | //--------------------------------- 8 | $topNavSwitch: true !default;//顶部导航 9 | $asideNavSwitch: true !default;//边栏导航 10 | $navSwitch: true !default;//主导航 11 | 12 | 13 | // top nav 14 | //--------------------------------- 15 | $topNavHeight: 36px !default; 16 | $topNavAPadding: 15px !default;//a的左右padding 17 | $topNavTextColor: $gray lighten($gray,20%) !default;//文本色:默认,激活/滑过 18 | $topNavBgColor: #333 !default;//背景色 19 | 20 | @if $topNavSwitch{ 21 | .wrap-top-bar{ 22 | background-color:$topNavBgColor; 23 | z-index: $zindexFixedTopbar; 24 | } 25 | #top_nav{ 26 | @extend %center-block; 27 | line-height: $topNavHeight; 28 | width: getWidth(12); 29 | 30 | li{ 31 | text-transform: capitalize; 32 | } 33 | a{ 34 | display: block; 35 | padding: 0 $topNavAPadding; 36 | color: nth($topNavTextColor,1); 37 | } 38 | li a:hover, 39 | .active a{ 40 | color:nth($topNavTextColor,2); 41 | } 42 | } 43 | } 44 | 45 | // aside nav 46 | //--------------------------------- 47 | $asideNavAHeight: 30px !default;//a的高度 48 | $asideNavTextColor: #333 #fff !default;//文本色:默认,激活/滑过 49 | $asideNavBgColor: darken($grayLight,4%) $primary !default;//背景色:默认,激活/滑过 50 | 51 | @if $asideNavSwitch{ 52 | .aside-nav{ 53 | background-color: nth($asideNavBgColor,1); 54 | li{ 55 | border-bottom:1px solid lighten(nth($asideNavBgColor,1),5%); 56 | &:last-child{ 57 | border-bottom:none; 58 | } 59 | a{ 60 | display: block; 61 | line-height: $asideNavAHeight; 62 | color:nth($asideNavTextColor,1); 63 | padding: 0 10px; 64 | @extend %zoom; 65 | } 66 | } 67 | li a:hover, 68 | .active a{ 69 | background-color: nth($asideNavBgColor,2); 70 | color: nth($asideNavTextColor,2); 71 | } 72 | } 73 | } 74 | 75 | // main nav 76 | //--------------------------------- 77 | $navHeight: 40px !default; 78 | $navAWidth: 120px !default; 79 | $navTextColor: #333 #fff !default;//文本色:默认,激活/滑过 80 | $navBgColor: darken($grayLight,4%) $primary !default;//背景色:默认,激活/滑过 81 | 82 | @if $navSwitch{ 83 | #nav{ 84 | background-color: nth($navBgColor,1); 85 | line-height: $navHeight; 86 | 87 | li{ 88 | border-right:1px solid lighten(nth($navBgColor,1),5%); 89 | 90 | a{ 91 | color: nth($navTextColor,1); 92 | width: $navAWidth; 93 | text-align: center; 94 | display: block; 95 | } 96 | } 97 | li a:hover, 98 | .active a{ 99 | background-color: nth($navBgColor,2); 100 | color:nth($navTextColor,2); 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /tobe/components/_paging.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // paging scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $pagingTextColor: #333 $white !default;//文本色:默认色,激活色 10 | $pagingBgColor: lighten($gray,7%) $primary !default;//背景色:默认色,激活色 11 | $pagingBreifColor: #fff $primary !default;//简洁分页导航颜色:文本色,背景色 12 | 13 | 14 | // 样式 15 | //--------------------------------- 16 | 17 | //默认居中 18 | .paging{ 19 | // font-family: $fontCn; 20 | margin:0 0 $baseGap; 21 | text-align: center; 22 | 23 | ul{ 24 | @include inline-block; 25 | } 26 | li{ 27 | margin:0 5px; 28 | @include float; 29 | } 30 | .active span, 31 | .disabled span, 32 | a{ 33 | @include float; 34 | padding:0 8px; 35 | line-height:24px; 36 | height:24px; 37 | text-decoration:none; 38 | } 39 | a{ 40 | color: nth($pagingTextColor,1); 41 | background-color: nth($pagingBgColor,1); 42 | &:hover{ 43 | text-decoration:none; 44 | color: nth($pagingTextColor,2); 45 | background-color: nth($pagingBgColor,2); 46 | } 47 | } 48 | .active span{ 49 | background-color: nth($pagingBgColor,2); 50 | color: nth($pagingTextColor,2); 51 | } 52 | .disabled span{ 53 | @include disabled; 54 | } 55 | } 56 | 57 | // 向左,向右对齐 58 | .paging-left{ 59 | text-align: left; 60 | } 61 | .paging-right{ 62 | text-align: right; 63 | } 64 | 65 | 66 | // paging-brief 67 | // 简洁版分页导航只有上一页/下一页 68 | //--------------------------------- 69 | .paging-brief{ 70 | text-align: right; 71 | height:30px; 72 | line-height:30px; 73 | 74 | a{ 75 | text-align: center; 76 | padding: 0 10px; 77 | color: nth($pagingBreifColor,1); 78 | background-color:nth($pagingBreifColor,2); 79 | @include inline-block; 80 | 81 | &:hover{ 82 | background-color:darken(nth($pagingBreifColor,2),5%); 83 | } 84 | } 85 | .prev{ 86 | @include float; 87 | } 88 | } -------------------------------------------------------------------------------- /tobe/components/_progress.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // progress scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $progressBorder: 1px solid $gray !default;//边框颜色 10 | $progressPercentBgColor: $primary !default;//进度条百分比背景色 11 | $progressRadiusSwitch: true !default;//默认不启用圆角 12 | 13 | // 斑马线渐变 14 | // 传入的$bgColor即为实现的斑马线背景色 15 | @mixin gradient-striped($bgColor: #555, $angle: 45deg) { 16 | background-color: $bgColor; 17 | @include gradient-angle($angle, rgba(255,255,255,.3) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.3) 50%, rgba(255,255,255,.3) 75%, transparent 75%, transparent); 18 | } 19 | 20 | // 样式 21 | //--------------------------------- 22 | .progress{ 23 | @if length($progressBorder) > 1{ 24 | border: $progressBorder; 25 | padding: 2px; 26 | } 27 | height: 18px; 28 | 29 | .progress-percent{ 30 | display: block; 31 | width: 50%; 32 | height: 100%; 33 | @include gradient-striped($progressPercentBgColor, 45deg); 34 | background-size: 50px 50px; 35 | } 36 | 37 | //是否启用圆角 38 | @if $progressRadiusSwitch{ 39 | &, 40 | & .progress-percent{ 41 | @include border-radius(13px); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /tobe/components/_rank.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // rank scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $rankTitleWidth: 160px !default; 10 | $rankRateNumRadius: 0 !default;//默认3px的圆角,为0则不启用 11 | $rankItemLineSwitch: true !default;//li间隔线开关 12 | 13 | 14 | // 样式 15 | //--------------------------------- 16 | .rank-list{ 17 | font-size: 12px; 18 | li{ 19 | @if $rankItemLineSwitch{ 20 | @extend %horizontal-line; 21 | } 22 | list-style: none outside none; 23 | text-align:right; 24 | margin-left:0; 25 | 26 | &.last, 27 | &:last-child{ 28 | border-bottom:none; 29 | } 30 | } 31 | i{ 32 | @include float; 33 | 34 | @if not(unitless($rankRateNumRadius)){ 35 | @include border-radius($rankRateNumRadius); 36 | } 37 | font-style: normal; 38 | text-align:center; 39 | background-color:$gray; 40 | overflow:hidden; 41 | margin-right:6px; 42 | width:16px; 43 | height:18px; 44 | } 45 | .rank-1st i, 46 | .rank-2nd i, 47 | .rank-3rd i{ 48 | color: #fff; 49 | } 50 | .rank-1st i { 51 | background-color: #FA4D11; 52 | } 53 | .rank-2nd i { 54 | background-color: #FA8411; 55 | } 56 | .rank-3rd i { 57 | background-color: #FAC011; 58 | } 59 | .title-link{ 60 | @include float; 61 | @extend %ellipsis-basic; 62 | text-align:left; 63 | width:$rankTitleWidth; 64 | } 65 | } -------------------------------------------------------------------------------- /tobe/components/_search.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // search scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $searchFormTextWidth: 140px !default; 10 | $searchRounded: false !default; 11 | 12 | 13 | // 样式 14 | //--------------------------------- 15 | @if $searchRounded { 16 | .form-search-block{ 17 | .search-text, 18 | .search-submit{ 19 | @include float; 20 | } 21 | .search-text{ 22 | @extend %simple-text; 23 | padding-left: 10px; 24 | width: $searchFormTextWidth; 25 | border-radius:15px 0 0 15px; 26 | } 27 | .search-submit{ 28 | @include simple-btn(ture); 29 | padding-left: 12px; 30 | border-radius:0 15px 15px 0; 31 | } 32 | } 33 | } @else { 34 | .form-search-block{ 35 | .search-text{ 36 | @extend %simple-text; 37 | width: $searchFormTextWidth; 38 | } 39 | .search-submit{ 40 | @include simple-btn(true); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tobe/components/_speakList.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // speak list 4 | // 评论或微博等信息列表 5 | //----------------------------------------------------- 6 | 7 | 8 | // 变量 9 | //--------------------------------- 10 | $speakImgSize: 50px 50px !default;//图片大小 11 | $speakImgRadius: 0 !default;//图片圆角,如果不要设置为0 12 | $speakGutter: 10px !default; //图片与文字的间距 13 | 14 | 15 | // 样式 16 | //--------------------------------- 17 | .speak-item{ 18 | 19 | @extend %clearfix; 20 | padding-left: nth($speakImgSize,1) + $speakGutter; 21 | 22 | .speak-left{ 23 | @include float; 24 | margin-left: - (nth($speakImgSize,1) + $speakGutter); 25 | 26 | img{ 27 | width: nth($speakImgSize,1); 28 | height: nth($speakImgSize,2); 29 | @if not(unitless($speakImgRadius)){ 30 | @include border-radius($speakImgRadius); 31 | } 32 | } 33 | } 34 | .speak-right{ 35 | h3{ 36 | line-height: 1.3; 37 | margin-bottom: 5px; 38 | font-weight: bold; 39 | } 40 | } 41 | .speak-content{ 42 | margin-bottom: 10px; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /tobe/components/_steps.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // steps scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 最多设计了四步,如超过四步,请根据第三步和第四步的的判断添加代码 8 | 9 | 10 | // 变量 11 | //--------------------------------- 12 | $stepsNum: 3 !default;//总共多少步,用来计算每步的宽度,注意ie6,7的百分比可能会有bug 13 | $stepsDotBorderColor: $gray $green !default;//圆点边框颜色:默认值,激活值 14 | 15 | //开关 16 | $stepsStyleSwitch: true !default;//默认标题类,如果为false则使用数字类 17 | 18 | // placeholder 19 | //--------------------------------- 20 | %steps-on{ 21 | border-top-color:nth($stepsDotBorderColor,2); 22 | color: nth($stepsDotBorderColor,2); 23 | .dot{ 24 | border-color:nth($stepsDotBorderColor,2); 25 | } 26 | } 27 | 28 | 29 | // 样式 30 | //--------------------------------- 31 | @if $stepsStyleSwitch{ 32 | // 标题类 33 | .steps-nav{ 34 | padding-top: 3px; 35 | margin-bottom:$baseGap; 36 | 37 | li{ 38 | width: 100% / $stepsNum; 39 | text-align: center; 40 | border-top:3px double nth($stepsDotBorderColor,1); 41 | position: relative; 42 | 43 | .dot{ 44 | background-color: #fff; 45 | border:1px solid nth($stepsDotBorderColor,1); 46 | position: absolute; 47 | left: 50%; 48 | margin-left: -5px; 49 | margin-top: -8px; 50 | top:0; 51 | width: 10px; 52 | height: 10px; 53 | overflow: hidden; 54 | font-size: 0; 55 | @include border-radius(6px); 56 | 57 | } 58 | strong{ 59 | display: block; 60 | margin-top: 15px; 61 | } 62 | } 63 | .steps-1st{ 64 | @extend %steps-on; 65 | } 66 | } 67 | } @else { 68 | // 数字类 69 | .steps-nav-num{ 70 | padding-top: 9px; 71 | padding-bottom: 9px; 72 | margin-bottom:$baseGap; 73 | 74 | li{ 75 | width: 100% / $stepsNum; 76 | text-align: center; 77 | border-top:3px double nth($stepsDotBorderColor,1); 78 | position: relative; 79 | 80 | .dot{ 81 | background-color: #fff; 82 | border:1px solid nth($stepsDotBorderColor,1); 83 | position: absolute; 84 | top:0; 85 | left: 50%; 86 | margin-left: -10px; 87 | margin-top: -13px; 88 | width: $baseFontSize * $baseLineHeight; 89 | height: $baseFontSize * $baseLineHeight; 90 | @include border-radius(50%); 91 | 92 | } 93 | } 94 | .steps-1st{ 95 | @extend %steps-on; 96 | } 97 | } 98 | } 99 | 100 | 101 | //第二步 102 | .steps-2{ 103 | .steps-1st, 104 | .steps-2nd{ 105 | @extend %steps-on; 106 | } 107 | } 108 | 109 | //第三步 110 | @if $stepsNum == 3{ 111 | .steps-3{ 112 | .steps-1st, 113 | .steps-2nd, 114 | .steps-3rd{ 115 | @extend %steps-on; 116 | } 117 | } 118 | } 119 | 120 | //第四步 121 | @if $stepsNum == 4{ 122 | .steps-3{ 123 | .steps-1st, 124 | .steps-2nd, 125 | .steps-3rd{ 126 | @extend %steps-on; 127 | } 128 | } 129 | .steps-4{ 130 | .steps-1st, 131 | .steps-2nd, 132 | .steps-3rd, 133 | .steps-4th{ 134 | @extend %steps-on; 135 | } 136 | } 137 | } -------------------------------------------------------------------------------- /tobe/components/_tagsFilter.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // tagsFilter scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //---------------------------------- 9 | $tagsLabelWidth: 50px !default;//label宽度 10 | $tagsSelector: span !default;//如果不支持ie6,使用span标签,如果支持ie6,使用a标签 11 | 12 | 13 | // 样式 14 | //---------------------------------- 15 | .tags-filter-item{ 16 | @extend %clearfix; 17 | padding-top: 5px; 18 | @if $lte7{ 19 | padding-bottom: 5px; 20 | } 21 | 22 | .tags-label{ 23 | @include float; 24 | width: $tagsLabelWidth; 25 | } 26 | .tags-content{ 27 | overflow: hidden; 28 | @extend %zoom; 29 | 30 | #{$tagsSelector}{ 31 | @include float; 32 | margin-right: 10px; 33 | padding: 0 2px; 34 | cursor: pointer; 35 | white-space: nowrap; 36 | margin-bottom: 5px; 37 | 38 | &.active,&:hover{ 39 | background-color: $primary; 40 | color:#fff; 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /tobe/components/_titleList.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // titleList scss 4 | //----------------------------------------------------- 5 | 6 | // 变量 7 | //--------------------------------- 8 | $titleListBg: true !default;//默认是否开启circle背景,如果默认没有,可通过添加circle-list这个class来搞定 9 | $titleListLiHeight: $baseFontSize * 1.8 !default;//行高 10 | $titleListTitleWidth: 300px !default;//默认标题链接宽度 11 | $titleListBgPaddingLeft: 12px !default;//开启图片后li的左padding 12 | 13 | 14 | // 样式 15 | //--------------------------------- 16 | .title-list{ 17 | li{ 18 | line-height:$titleListLiHeight; 19 | } 20 | .title-link{ 21 | @extend %ellipsis-basic; 22 | display: block; 23 | width:$titleListTitleWidth; 24 | } 25 | } 26 | .title-left{ 27 | li{ 28 | text-align:right; 29 | } 30 | .title-link{ 31 | @include float; 32 | width:$titleListTitleWidth; 33 | text-align:left; 34 | } 35 | } 36 | 37 | // 开启circle背景 38 | //--------------------------------- 39 | @if $titleListBg{ 40 | .title-list li{ 41 | background:url('images/icon-circle.gif') no-repeat 0; /*1*/ 42 | padding-left:$titleListBgPaddingLeft; 43 | } 44 | }@else{ 45 | .circle-list li{ 46 | background:url('images/icon-circle.gif') no-repeat 0; /*1*/ 47 | padding-left:$titleListBgPaddingLeft; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tobe/components/_tooltip.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | //----------------------------------------------------- 3 | // tooltips scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 变量 8 | //--------------------------------- 9 | $tooltipBorderColor: $gray !default;//边框颜色,三角箭头也用这个颜色 10 | $tooltipArrowDirection: 'top' 'right' 'bottom' 'left' !default;//箭头方向,每个方向生成对应的css,如果只要部分方向的css,请覆写这个变量 11 | $tooltipArrowSize: 8px !default;//箭头大小 12 | $tooltipArrowPosition: 10px !default;//箭头位置 13 | 14 | 15 | // placeholder 16 | //--------------------------------- 17 | %tip-arrow{ 18 | font-style:normal; 19 | position:absolute; 20 | width: 0; 21 | height: 0; 22 | overflow: hidden; 23 | } 24 | 25 | 26 | // 样式 27 | //--------------------------------- 28 | .tooltip-box{ 29 | border:1px solid $tooltipBorderColor; 30 | background-color: #fff; 31 | position: absolute; 32 | z-index:$zindexTooltip; 33 | 34 | .tip-content{ 35 | padding: 10px; 36 | } 37 | } 38 | 39 | // 循环得到箭头方向样式 40 | @each $direction in $tooltipArrowDirection{ 41 | .tip-arrow-#{$direction}{ 42 | @extend %tip-arrow; 43 | 44 | @if $direction == 'top' { 45 | border-bottom:$tooltipArrowSize solid $tooltipBorderColor; 46 | border-left:$tooltipArrowSize dashed transparent; 47 | border-right:$tooltipArrowSize dashed transparent; 48 | top: -$tooltipArrowSize; 49 | left:$tooltipArrowPosition; 50 | } 51 | @if $direction == 'right' { 52 | border-left:$tooltipArrowSize solid $tooltipBorderColor; 53 | border-top:$tooltipArrowSize dashed transparent; 54 | border-bottom:$tooltipArrowSize dashed transparent; 55 | right:-$tooltipArrowSize; 56 | top: $tooltipArrowPosition; 57 | } 58 | @if $direction == 'bottom' { 59 | border-top:$tooltipArrowSize solid $tooltipBorderColor; 60 | border-left:$tooltipArrowSize dashed transparent; 61 | border-right:$tooltipArrowSize dashed transparent; 62 | bottom: -$tooltipArrowSize; 63 | left:$tooltipArrowPosition; 64 | } 65 | @if $direction == 'left' { 66 | border-right:$tooltipArrowSize solid $tooltipBorderColor; 67 | border-top:$tooltipArrowSize dashed transparent; 68 | border-bottom:$tooltipArrowSize dashed transparent; 69 | left:-$tooltipArrowSize; 70 | top: $tooltipArrowPosition; 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /tobe/core/_setting.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // setting scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // 开关设置 8 | //----------------------------------------------------- 9 | $lte7: true !default; //是否兼容ie6-7 10 | $filter: false !default; //是否为ie6-8开启css3滤镜兼容,常用于渐变背景 11 | $printStyleSwitch: false !default; //是否开启打印样式 12 | 13 | 14 | // font相关 15 | //----------------------------------------------------- 16 | $baseFontSize: 14px !default; 17 | $baseLineHeight: 1.5 !default; 18 | $baseFontFamily: "Helvetica Neue", Helvetica, Tahoma, sans-serif !default; 19 | $fontCn: "SimSun"; //宋体 20 | $fontYaHei: "Microsoft Yahei"; //微软雅黑 21 | $fontHeiTi: "SimHei"; //黑体 22 | 23 | 24 | // 元素上下间距 25 | //----------------------------------------------------- 26 | $baseGap: 20px !default; 27 | 28 | 29 | // 基本颜色 30 | // color function : http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html 31 | // lighten($color, $amount) 32 | // darken($color, $amount) 33 | // opacify($color, $amount) 34 | // mix($color1, $color2[, $amount]) 35 | //----------------------------------------------------- 36 | $black: #000 !default; 37 | $grayDarker: #333 !default; 38 | $grayDark: #999 !default; 39 | $gray: #ccc !default; 40 | $grayLight: #f5f5f5 !default; 41 | $white: #fff !default; 42 | 43 | $red: #cc3300 !default; 44 | $blue: #00A3CF !default; 45 | $blueDark: #0064cd !default; 46 | $orange: #F47837 !default; 47 | $green: #51B148 !default; 48 | $yellow: #ffc40d !default; 49 | $pink: #c3325f !default; 50 | $purple: #7a43b6 !default; 51 | 52 | $primary: #0078E7 !default;//主色 53 | 54 | 55 | // link 56 | //----------------------------------------------------- 57 | // 如果只有一个值则滑过的值为这个值的darken 5%,如果 58 | // 有两个值则第二个值为滑过的值 59 | $linkColor: #08c !default; 60 | 61 | 62 | // scaffolding 63 | //----------------------------------------------------- 64 | $bodyBgColor: $white !default; 65 | $textColor: $grayDarker !default; 66 | 67 | 68 | // placeholder 69 | //----------------------------------------------------- 70 | // 变量分别为:是否输出表单的占位符placeholder样式,文本色 71 | $placeholder: true $gray !default; 72 | 73 | 74 | // 交互配色 75 | // 警告,错误,成功,提示 76 | //----------------------------------------------------- 77 | // 每个变量都有三个颜色值,分别为:文本色,背景色,边框色 78 | $warningColor: #514721 #FFF6BF #FFD324 !default; 79 | $errorColor: #8A1F11 #FBE3E4 #FBC2C4 !default; 80 | $successColor: #264409 #E6EFC2 #C6D880 !default; 81 | $infoColor: #205791 #D5EDF8 #92CAE4 !default; 82 | 83 | 84 | // radius 85 | //----------------------------------------------------- 86 | $baseRadius: 5px !default; 87 | $smallRadius: 3px !default; 88 | 89 | 90 | // z-index 91 | //----------------------------------------------------- 92 | $zindexDropdown: 1000 !default; 93 | $zindexFixedTopbar: 1010 !default; 94 | $zindexTooltip: 1020 !default; 95 | $zindexAlert: 1030 !default; 96 | $zindexModal: 1100 !default; -------------------------------------------------------------------------------- /tobe/ext/_btn.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* ------------------------------------------------- 3 | * btn scss 4 | * ------------------------------------------------- 5 | */ 6 | 7 | 8 | // 变量 9 | //---------------------------------- 10 | $btnBaseClass: btn !default; //按钮的基本class 11 | $btnFormBaseClass: formbtn !default; //form中input和button元素按钮的class 12 | $btnNormalSize: 16px 28px 14px !default; //默认按钮的左右padding,高度,字体大小,圆角 13 | $btnSizeClass: () !default; //(small 5px 21px 12px) 每个括号为一组,里面四个参数分别为:class 左右padding,高度,字体大小 14 | $btnColorClass: () !default; //(primary $primary #fff) 每个括号为一组,里面三个参数分别为:class 背景色 文本色 15 | 16 | // 开关按钮 17 | $btnBgGradientSwitch: false !default;//是否启用渐变背景 18 | 19 | 20 | 21 | // btn placeholder selectors and mixin 22 | //---------------------------------- 23 | 24 | // btn common style 25 | // 按钮基本样式,联合申明 26 | %btn-basic{ 27 | @include inline-block; 28 | cursor: pointer; 29 | text-align:center; 30 | border:0 none; 31 | } 32 | 33 | // btn-gradient 34 | // 半透明到全透明的白色渐变,通过设置不同的背景色来表示不同的渐变 35 | %btn-gradient { 36 | box-shadow: 0 1px 1px rgba(255, 255, 255, 0.5) inset, 0 0 1px rgba(255, 255, 255, 0.5) inset; 37 | @extend %gradient-linear-light; 38 | } 39 | 40 | // btn-size 41 | @mixin btn-size($padding:nth($btnNormalSize,1), $height:nth($btnNormalSize,2), $fontSize:nth($btnNormalSize,3), $formbtn: false){ 42 | padding:0 $padding; 43 | font-size:$fontSize; 44 | 45 | @if $formbtn{ 46 | // form元素按钮(如button,input:submit),设置height来反应其高度 47 | height: $height; 48 | } @else { 49 | // 普通按钮,通过设置line-height来反应其高度 50 | line-height: $height; 51 | } 52 | } 53 | 54 | // btn-color 55 | // 包括按钮背景,文本色,是否有边框 56 | @mixin btn-color($bgColor:#e6e6e6, $textColor:#333){ 57 | color:$textColor; 58 | background-color: $bgColor; 59 | @if $btnBgGradientSwitch { 60 | border:1px solid darken($bgColor, 5%); 61 | border-color:lighten($bgColor, 2%) darken($bgColor, 5%) darken($bgColor, 5%) lighten($bgColor, 2%); 62 | } 63 | 64 | &:hover{ 65 | background-color: darken($bgColor,5%); 66 | color:$textColor; 67 | } 68 | } 69 | 70 | 71 | // 两种类别按钮,普通的和form表单元素的 72 | //---------------------------------- 73 | 74 | .#{$btnBaseClass}{ 75 | @extend %btn-basic; 76 | @include btn-size; 77 | @include btn-color; 78 | } 79 | .#{$btnFormBaseClass}{ 80 | @extend %btn-basic; 81 | @include btn-size($formbtn: true); 82 | @include btn-color; 83 | } 84 | 85 | // 如果启用渐变背景,引入%btn-gradient; 86 | @if $btnBgGradientSwitch { 87 | .#{$btnBaseClass}, .#{$btnFormBaseClass}{ 88 | @extend %btn-gradient; 89 | } 90 | } 91 | 92 | 93 | // 不同大小的btn class 94 | //---------------------------------- 95 | 96 | // 如果输出单个大小按钮,直接调用btn-size 97 | // @include btn-size($padding, $height, $fontSize, $formbtn) 98 | // 最后一个$formbtn参数,如果是普通按钮可以忽略(默认为false),如果是form表单元素按钮则传入true 99 | 100 | // 如果输出多个大小按钮,则直接调用下面的mixin 101 | // @include btn-size-multi(); 102 | @mixin btn-size-multi($sizeLists: $btnSizeClass){ 103 | @each $size in $sizeLists{ 104 | $class: nth($size, 1); 105 | $padding: nth($size, 2); 106 | $height: nth($size, 3); 107 | $fontSize: nth($size, 4); 108 | 109 | .#{$btnBaseClass}-#{$class}{ 110 | @include btn-size($padding, $height, $fontSize); 111 | } 112 | .#{$btnFormBaseClass}-#{$class}{ 113 | @include btn-size($padding, $height, $fontSize, true); 114 | } 115 | } 116 | } 117 | 118 | 119 | 120 | // 不同颜色的btn class 121 | //---------------------------------- 122 | 123 | // 如果输出单个颜色按钮,直接调用btn-color 124 | // @include btn-color($bgColor,$textColor); 125 | .#{$btnBaseClass}-primary { 126 | @include btn-color($primary, #fff); 127 | } 128 | 129 | //如果输出至少两个不同颜色按钮,则调用下面的mixin 130 | // @include btn-color-multi(); 131 | @mixin btn-color-multi($colorLists: $btnColorClass){ 132 | @each $color in $colorLists{ 133 | $class: nth($color,1); 134 | $bgColor: nth($color,2); 135 | $textColor: nth($color,3); 136 | 137 | .#{$btnBaseClass}-#{$class}{ 138 | @include btn-color($bgColor,$textColor); 139 | } 140 | } 141 | } -------------------------------------------------------------------------------- /tobe/ext/_helper.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // helpers scss 4 | //----------------------------------------------------- 5 | 6 | // ul/ol has list style 7 | ul.has-style{ 8 | @extend %ul-has-style; 9 | } 10 | // li float 11 | ul.inline-float{ 12 | @extend %clearfix; 13 | li{ 14 | @include float; 15 | } 16 | } 17 | // li inline-block 18 | ul.inline-block{ 19 | li{ 20 | @extend %inline-block; 21 | margin-right: 8px; 22 | &:last-child{ 23 | margin-right: 0; 24 | } 25 | } 26 | } 27 | 28 | // 浮动及闭合浮动 29 | .fl{ 30 | @extend %float; 31 | } 32 | .fr{ 33 | @include float(right); 34 | } 35 | .clearfix{ 36 | @extend %clearfix; 37 | } 38 | 39 | // 不同形式的隐藏 40 | .hidden{ 41 | @extend %hidden; 42 | } 43 | .visually-hidden { 44 | @extend %visually-hidden; 45 | } 46 | 47 | // text-align:left/right/center 48 | .tar{ 49 | text-align: right; 50 | } 51 | .tac{ 52 | text-align: center; 53 | } 54 | 55 | // 图片替换文字 56 | .ir{ 57 | @extend %ir; 58 | } 59 | 60 | // 灰色 61 | .gray{ 62 | color:$gray; 63 | } -------------------------------------------------------------------------------- /tobe/ext/_typography.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // typography scss 4 | //----------------------------------------------------- 5 | 6 | // 变量 7 | //----------------------------------------------------- 8 | $article: true article !default; //第一个变量为是否开启文章详细页样式,第二个为默认的class 9 | 10 | 11 | // Blockquotes 12 | blockquote { 13 | padding: 0 0 0 15px; 14 | margin: 0 0 10px; 15 | border-left: 3px solid $gray; 16 | small { 17 | font-size: $baseFontSize * 0.85; 18 | display: block; 19 | line-height: $baseLineHeight; 20 | color: $grayDark; 21 | &:before { 22 | content: '\2014 \00A0'; 23 | } 24 | } 25 | } 26 | 27 | 28 | // Quotes 29 | q:before, 30 | q:after, 31 | blockquote:before, 32 | blockquote:after { 33 | content: ""; 34 | } 35 | 36 | 37 | // Addresses 38 | address { 39 | display: block; 40 | margin-bottom: 10px; 41 | font-style: normal; 42 | line-height: $baseLineHeight; 43 | } 44 | 45 | 46 | // hr 47 | hr { 48 | display: block; 49 | height: 1px; 50 | border: 0; 51 | border-top: 1px solid #ccc; 52 | margin: 1em 0; 53 | padding: 0; 54 | } 55 | 56 | 57 | // article style 58 | // 详细页文章内容样式,通过变量$articleStyleSwitch来控制输出 59 | // 详细页内容的默认的class为.article,可通过变量$articleClass来设置 60 | //----------------------------------------------------- 61 | @if nth($article,1){ 62 | .#{nth($article,2)}{ 63 | line-height: 1.6; 64 | h1, h2, h3, h4, h5, h6 { 65 | line-height:1.3; 66 | margin-bottom:10px; 67 | } 68 | ul,ol{ 69 | margin-left: 25px; 70 | list-style-type:disc; 71 | } 72 | ol{ 73 | list-style-type:decimal; 74 | } 75 | p, ul, ol, dl{ 76 | margin-bottom:10px; 77 | } 78 | ul ul, ul ol, ol ol, ol ul{ 79 | margin-bottom: 0; 80 | } 81 | dt{ 82 | font-weight: bold; 83 | line-height: 1.8; 84 | } 85 | dd{ 86 | margin-left: 2em; 87 | } 88 | img{ 89 | margin-bottom: 10px; 90 | border:1px solid $gray; 91 | padding: 2px; 92 | } 93 | .fr img{ 94 | margin-left: 10px; 95 | } 96 | .fl img{ 97 | margin-right: 10px; 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /tobe/ext/animate/_attention-seekers.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // attention seekers scss 4 | //----------------------------------------------------- 5 | 6 | 7 | //bounce 8 | @mixin animate-bounce () { 9 | @include keyframes(bounce){ 10 | 0%, 20%, 50%, 80%, 100% { 11 | @include translateY(0); 12 | } 13 | 14 | 40% { 15 | @include translateY(-30px); 16 | } 17 | 18 | 60% { 19 | @include translateY(-15px); 20 | } 21 | } 22 | .bounce { 23 | @include animation-name(bounce); 24 | @extend %animated; 25 | } 26 | } 27 | 28 | // flash 29 | @mixin animate-flash () { 30 | @include keyframes(flash){ 31 | 0%, 50%, 100% { 32 | opacity: 1; 33 | } 34 | 35 | 25%, 75% { 36 | opacity: 0; 37 | } 38 | } 39 | .flash { 40 | @include animation-name(flash); 41 | @extend %animated; 42 | } 43 | } 44 | 45 | // pulse 46 | @mixin animate-pulse () { 47 | @include keyframes(pulse){ 48 | 0% { 49 | @include scale(1); 50 | } 51 | 50% { 52 | @include scale(1.1); 53 | } 54 | 100% { 55 | @include scale(1); 56 | } 57 | } 58 | .pulse { 59 | @include animation-name(pulse); 60 | @extend %animated; 61 | } 62 | } 63 | 64 | // shake 65 | @mixin animate-shake () { 66 | @include keyframes(shake){ 67 | 0%,100%{ 68 | @include translateX(0); 69 | } 70 | 10%,30%,50%,70%,90%{ 71 | @include translateX(-10px); 72 | } 73 | 20%,40%,60%,80%{ 74 | @include translateX(10px); 75 | } 76 | } 77 | .shake { 78 | @include animation-name(shake); 79 | @extend %animated; 80 | } 81 | } 82 | 83 | // swing 84 | @mixin animate-swing () { 85 | @include keyframes(swing){ 86 | 20% { 87 | @include rotate(15deg); 88 | } 89 | 40%{ 90 | @include rotate(-10deg); 91 | } 92 | 60% { 93 | @include rotate(5deg); 94 | } 95 | 80% { 96 | @include rotate(-5deg); 97 | } 98 | 100% { 99 | @include rotate(0deg); 100 | } 101 | } 102 | .swing { 103 | @include transform-origin(top center); 104 | @include animation-name(swing); 105 | @extend %animated; 106 | } 107 | } 108 | 109 | // tada 110 | @mixin animate-tada () { 111 | @include keyframes(tada){ 112 | 0% { 113 | @include scale(1); 114 | } 115 | 10%,20% { 116 | @include transform(scale(.9) rotate(-3deg)); 117 | } 118 | 30%,50%,70%,90%{ 119 | @include transform(scale(1.1) rotate(3deg)); 120 | } 121 | 40%,60%,80%{ 122 | @include transform(scale(1.1) rotate(-3deg)); 123 | } 124 | 100%{ 125 | @include transform(scale(1) rotate(0)); 126 | } 127 | } 128 | .tada { 129 | @include animation-name(tada); 130 | @extend %animated; 131 | } 132 | } 133 | 134 | // wobble 135 | @mixin animate-wobble () { 136 | @include keyframes(wobble){ 137 | 0% { 138 | @include translateX(0%); 139 | } 140 | 15% { 141 | @include transform(translateX(-25%) rotate(-5deg)); 142 | } 143 | 30% { 144 | @include transform(translateX(20%) rotate(3deg)); 145 | } 146 | 45% { 147 | @include transform(translateX(-15%) rotate(-3deg)); 148 | } 149 | 60% { 150 | @include transform(translateX(10%) rotate(2deg)); 151 | } 152 | 75% { 153 | @include transform(translateX(-5%) rotate(-1deg)); 154 | } 155 | 100% { 156 | @include translateX(0%); 157 | } 158 | } 159 | .wobble { 160 | @include animation-name(wobble); 161 | @extend %animated; 162 | } 163 | } -------------------------------------------------------------------------------- /tobe/ext/animate/_flip.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // flip scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // flip 8 | @mixin animate-flip () { 9 | @include keyframes(flip){ 10 | 0% { 11 | @include transform(perspective(400px) translateZ(0) rotateY(0) scale(1)); 12 | } 13 | 40% { 14 | @include transform(perspective(400px) translateZ(150px) rotateY(170deg) scale(1)); 15 | } 16 | 50% { 17 | @include transform(perspective(400px) translateZ(150px) rotateY(190deg) scale(1)); 18 | } 19 | 80% { 20 | @include transform(perspective(400px) translateZ(0) rotateY(360deg) scale(.95)); 21 | } 22 | 100% { 23 | @include transform(perspective(400px) translateZ(0) rotateY(360deg) scale(1)); 24 | } 25 | } 26 | .flip { 27 | @include animation-name(flip); 28 | @include backface-visibility(visible); 29 | @include animation-timing-function(ease-out); 30 | @extend %animated; 31 | } 32 | } 33 | 34 | // flipInX 35 | @mixin animate-flipInX () { 36 | @include keyframes(flipInX){ 37 | 0% { 38 | @include transform(perspective(400px) rotateX(90deg)); 39 | opacity: 0; 40 | } 41 | 40% { 42 | @include transform(perspective(400px) rotateX(-10deg)); 43 | } 44 | 70% { 45 | @include transform(perspective(400px) rotateX(10deg)); 46 | } 47 | 100% { 48 | @include transform(perspective(400px) rotateX(0deg)); 49 | opacity: 1; 50 | } 51 | } 52 | .flipInX { 53 | @include animation-name(flipInX); 54 | @include backface-visibility(visible); 55 | @extend %animated; 56 | } 57 | } 58 | 59 | // flipInY 60 | @mixin animate-flipInY () { 61 | @include keyframes(flipInY){ 62 | 0% { 63 | @include transform(perspective(400px) rotateY(90deg)); 64 | opacity: 0; 65 | } 66 | 40% { 67 | @include transform(perspective(400px) rotateY(-10deg)); 68 | } 69 | 70% { 70 | @include transform(perspective(400px) rotateY(10deg)); 71 | } 72 | 100% { 73 | @include transform(perspective(400px) rotateY(0deg)); 74 | opacity: 1; 75 | } 76 | } 77 | .flipInY { 78 | @include animation-name(flipInY); 79 | @include backface-visibility(visible); 80 | @extend %animated; 81 | } 82 | } 83 | 84 | // flipOutX 85 | @mixin animate-flipOutX () { 86 | @include keyframes(flipOutX){ 87 | 0% { 88 | @include transform(perspective(400px) rotateX(0deg)); 89 | opacity: 1; 90 | } 91 | 100% { 92 | @include transform(perspective(400px) rotateX(90deg)); 93 | opacity: 0; 94 | } 95 | } 96 | .flipOutX { 97 | @include animation-name(flipOutX); 98 | @include backface-visibility(visible); 99 | @extend %animated; 100 | } 101 | } 102 | 103 | // flipOutY 104 | @mixin animate-flipOutY () { 105 | @include keyframes(flipOutY){ 106 | 0% { 107 | @include transform(perspective(400px) rotateY(0deg)); 108 | opacity: 1; 109 | } 110 | 100% { 111 | @include transform(perspective(400px) rotateY(90deg)); 112 | opacity: 0; 113 | } 114 | } 115 | .flipOutY { 116 | @include animation-name(flipOutY); 117 | @include backface-visibility(visible); 118 | @extend %animated; 119 | } 120 | } -------------------------------------------------------------------------------- /tobe/ext/animate/_lightspeed.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // lightspeed scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // lightSpeedIn 8 | @mixin animate-lightSpeedIn () { 9 | @include keyframes(lightSpeedIn){ 10 | 0% { 11 | opacity: 0; 12 | @include transform(translateX(100%) skewX(-30deg)); 13 | } 14 | 60% { 15 | opacity: 1; 16 | @include transform(translateX(-20%) skewX(30deg)); 17 | } 18 | 80% { 19 | @include transform(translateX(0%) skewX(-15deg)); 20 | } 21 | 100% { 22 | @include transform(translateX(0%) skewX(0)); 23 | } 24 | } 25 | .lightSpeedIn { 26 | @include animation-name(lightSpeedIn); 27 | @include animation-timing-function(ease-out); 28 | @include backface-visibility; 29 | @extend %animated; 30 | } 31 | } 32 | 33 | // lightSpeedOut 34 | @mixin animate-lightSpeedOut () { 35 | @include keyframes(lightSpeedOut){ 36 | 0% { 37 | opacity: 1; 38 | @include transform(translateX(0%) skewX(0deg)); 39 | } 40 | 100% { 41 | opacity: 0; 42 | @include transform(translateX(100%) skewX(-30deg)); 43 | } 44 | } 45 | .lightSpeedOut { 46 | @include animation-name(lightSpeedOut); 47 | @include animation-timing-function(ease-in); 48 | @extend %animated; 49 | } 50 | } -------------------------------------------------------------------------------- /tobe/ext/animate/_slide.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // slide scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // slideInDown 8 | @mixin animate-slideInDown () { 9 | @include keyframes(slideInDown){ 10 | 0% { 11 | opacity: 0; 12 | @include translateY(-2000px); 13 | } 14 | 100% { 15 | @include translateY(0); 16 | } 17 | } 18 | .slideInDown { 19 | @include animation-name(slideInDown); 20 | @extend %animated; 21 | } 22 | } 23 | 24 | // slideInLeft 25 | @mixin animate-slideInLeft () { 26 | @include keyframes(slideInLeft){ 27 | 0% { 28 | opacity: 0; 29 | @include translateX(-2000px); 30 | } 31 | 100% { 32 | @include translateX(0); 33 | } 34 | } 35 | .slideInLeft { 36 | @include animation-name(slideInLeft); 37 | @extend %animated; 38 | } 39 | } 40 | 41 | // slideInRight 42 | @mixin animate-slideInRight () { 43 | @include keyframes(slideInRight){ 44 | 0% { 45 | opacity: 0; 46 | @include translateX(2000px); 47 | } 48 | 100% { 49 | @include translateX(0); 50 | } 51 | } 52 | .slideInRight { 53 | @include animation-name(slideInRight); 54 | @extend %animated; 55 | } 56 | } 57 | 58 | // slideOutLeft 59 | @mixin animate-slideOutLeft () { 60 | @include keyframes(slideOutLeft){ 61 | 0% { 62 | @include translateX(0); 63 | } 64 | 100% { 65 | opacity: 0; 66 | @include translateX(-2000px); 67 | } 68 | } 69 | .slideOutLeft { 70 | @include animation-name(slideOutLeft); 71 | @extend %animated; 72 | } 73 | } 74 | 75 | // slideOutRight 76 | @mixin animate-slideOutRight () { 77 | @include keyframes(slideOutRight){ 78 | 0% { 79 | @include translateX(0); 80 | } 81 | 100% { 82 | opacity: 0; 83 | @include translateX(2000px); 84 | } 85 | } 86 | .slideOutRight { 87 | @include animation-name(slideOutRight); 88 | @extend %animated; 89 | } 90 | } 91 | 92 | // slideOutUp 93 | @mixin animate-slideOutUp () { 94 | @include keyframes(slideOutUp){ 95 | 0% { 96 | @include translateY(0); 97 | } 98 | 100% { 99 | opacity: 0; 100 | @include translateY(-2000px); 101 | } 102 | } 103 | .slideOutUp { 104 | @include animation-name(slideOutUp); 105 | @extend %animated; 106 | } 107 | } -------------------------------------------------------------------------------- /tobe/ext/animate/_special.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // special scss 4 | //----------------------------------------------------- 5 | 6 | 7 | // hinge 8 | @mixin animate-hinge () { 9 | @include keyframes(hinge){ 10 | 0% { 11 | @include rotate(0); 12 | } 13 | 20%,60% { 14 | @include rotate(80deg); 15 | } 16 | 40% { 17 | @include rotate(60deg); 18 | } 19 | 80% { 20 | opacity: 1; 21 | @include transform(rotate(60deg) translateY(0)); 22 | } 23 | 100% { 24 | opacity: 0; 25 | @include translateY(700px); 26 | } 27 | } 28 | .hinge { 29 | @include transform-origin(top left); 30 | @include animation-timing-function(ease-in-out); 31 | @include animation-name(hinge); 32 | @extend %animated; 33 | @include animation-duration(2s); 34 | } 35 | } 36 | 37 | // rollIn 38 | @mixin animate-rollIn () { 39 | @include keyframes(rollIn){ 40 | 0% { 41 | opacity: 0; 42 | @include transform(translateX(-100%) rotate(-120deg)); 43 | } 44 | 100% { 45 | opacity: 1; 46 | @include transform(translateX(0px) rotate(0deg)); 47 | } 48 | } 49 | .rollIn { 50 | @include animation-name(rollIn); 51 | @extend %animated; 52 | } 53 | } 54 | 55 | // rollOut 56 | @mixin animate-rollOut () { 57 | @include keyframes(rollOut){ 58 | 0% { 59 | opacity: 1; 60 | @include transform(translateX(0) rotate(0)); 61 | } 62 | 100% { 63 | opacity: 0; 64 | @include transform(translateX(100%) rotate(120deg)); 65 | } 66 | } 67 | .rollOut { 68 | @include animation-name(rollOut); 69 | @extend %animated; 70 | } 71 | } -------------------------------------------------------------------------------- /tobe/ext/font-face/_font-face.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | //----------------------------------------------------- 3 | // font-face scss 4 | // http://fontawesome.io/ 5 | // 支持ie8+ 6 | //----------------------------------------------------- 7 | 8 | 9 | //----------------------------------------------------- 10 | // 如需要全部的icon class,设置$fontClassAllSwitch为true即可 11 | // 如输出单个icon class,直接调用@include font-icon($name,fontSearch($name)); 12 | // 如要输出大于或等于2个icon,覆写$fontClassoutput即可,如$fontClassoutput:glass music search heart;则输出这四个icon的class 13 | //----------------------------------------------------- 14 | 15 | 16 | // 导入变量 17 | @import "variables"; 18 | 19 | 20 | // 申明@font-face 21 | @include font-face($fontFamily, $fontFilePath); 22 | 23 | 24 | // 定义mixin等基础功能 25 | //----------------------------------------------------- 26 | 27 | // 基础样式 28 | %font-basic{ 29 | display: inline-block; 30 | font-family: $fontFamily; 31 | font-style: normal; 32 | font-weight: normal; 33 | line-height: 1; 34 | -webkit-font-smoothing: antialiased; 35 | -moz-osx-font-smoothing: grayscale; 36 | } 37 | 38 | 39 | // 传入单个名字,以在所有的$ClassAll变量中查询到其对应的内容 40 | // 如glass,查询到的就是"\f000",music对应的就是"\f001" 41 | @function fontSearch($needle, $sea: $fontClassAll){ 42 | @each $item in $sea { 43 | $index: index($item, $needle); 44 | 45 | @if $index { 46 | $return: if($index == 1, 2, $index); 47 | @return nth($item,$return); 48 | } 49 | } 50 | @warn "no #{$needle} in the variables, please check it!"; 51 | @return false; 52 | } 53 | 54 | 55 | // icon mixin 56 | @mixin font-icon($class){ 57 | .#{$fontClassPrefix}-#{$class}{ 58 | @extend %font-basic; 59 | 60 | &:before{ 61 | content: fontSearch($class); 62 | @extend %box-sizing-border; 63 | } 64 | } 65 | } 66 | 67 | 68 | // 全部输出 69 | @if $fontClassAllSwitch { 70 | @each $class in $fontClassAll { 71 | $name: nth($class,1); 72 | $content: nth($class,2); 73 | 74 | @include font-icon($name,$content); 75 | } 76 | } @else { 77 | // 部分输出的class 78 | @if length($fontClassoutput) >= 2{ 79 | @each $class in $fontClassoutput{ 80 | @include font-icon($class); 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /tobe/ext/font-face/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/tobe/ext/font-face/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /tobe/ext/font-face/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/tobe/ext/font-face/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /tobe/ext/font-face/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/tobe/ext/font-face/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /tobe/ext/font-face/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marvin1023/tobe/bd73ffa3a325e8bd6a747bd1e3ed4c158fa14810/tobe/ext/font-face/fonts/fontawesome-webfont.woff --------------------------------------------------------------------------------