Commit 2380ad62 by xuzhenghua

Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu into xzhindex

parents 57494c3e 2e84c9c5
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root"}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root"}
>
<i className={"icoName ico"} />
<span className={styles.text}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root"}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router'
import styles from './index.scss'
export default class NavLink extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<Link
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root"}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root"}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
// className={"root"}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root"}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
.root-item {
flex: auto;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
line-height: 1;
color: #666;
&:hover {
color: #0099ff;
}
}
.ico {
font-size: 0.42rem;
display: block;
margin-bottom: 0.1rem;
}
.text {
display: block;
line-height: 1;
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root-item "}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root-item"}
>
<i className={"icoName ico"} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={"root-item"}
>
<i className={icoName} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #09f;
&:hover, &:active {
color: #09f;
}
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #09f;
&:hover, &:active {
color: #09f;
}
}
.iconfont{
font-size: 24px;
margin-bottom: 4px;
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #09f;
&:hover, &:active {
color: #09f;
}
}
.iconfont{
font-size: 24px !important;
margin-bottom: 4px;
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={"navFour"}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div className="root">
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={"navFour"}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className="root">
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={"navFour"}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className="root">
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={"navFour"}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
flex: auto;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
line-height: 1;
color: #666;
&:hover {
color: #0099ff;
}
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #09f;
&:hover, &:active {
color: #09f;
}
}
.iconfont{
font-size: 24px !important;
margin-bottom: 4px;
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #09f;
&:hover, &:active {
color: #09f;
}
}
.iconfont{
font-size: 24px !important;
margin-bottom: 4px;
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className="root">
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="iconfont iconiconfront-16"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={"navFour"}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className="root">
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="iconfont iconiconfront-16"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="iconfont iconxuexi"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={"navFour"}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className="root">
<NavLink
pathUrl="/"
exact
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="iconfont iconiconfront-16"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="iconfont iconxuexi"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="iconfont iconhome"
active={"navFour"}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React from 'react';
import ReactDOM from 'react-dom';
import Router from './router';
// import { Provider } from 'react-redux';
import './styles/index.scss';
ReactDOM.render(
<Router />,
document.getElementById('root'));
\ No newline at end of file
import React from 'react';
import ReactDOM from 'react-dom';
import Router from './router';
// import { Provider } from 'react-redux';
// 默认样式
import './styles/index.scss';
// iconfont
import './font/iconfont.css';
ReactDOM.render(
<Router />,
document.getElementById('root'));
\ No newline at end of file
// 使用建议
// --------------------------------------------------
// CSS Modules 是对现有的 CSS 做减法。为了追求简单可控,建议遵循如下原则:
// ·不使用选择器(id,伪类,标签等),只使用class名来定义样式
// ·不层叠多个class,只使用一个class把所有样式定义好
// ·所有样式通过 composes 组合来实现复用
// ·不嵌套
// --------------------------------------------------
// 公有样式引入mixins的目的是为了方便默认设置若干常用的样式
// 公有样式不可以使用composes
@import "./variable.scss";
// 颜色设置
$border-color: #e9e9e9; //边框颜色
$body-color: #333; //设置通用的字体颜色
$body-bg: #f2f2f2; //设置通用的 body 背景色
$link-color: #333; //设置通用的链接颜色
$link-visited: #333; //设置链接访问后的颜色
$main-color: #1BBC9B; //主体颜色
// 字体
$font-family-zh: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
$font-family-en: Arial, sans-serif !default;
// 盒子模型
$box-model: border-box !default;
// z-index
$z-50: 50;
$z-100: 100;
$z-150: 150;
$z-200: 200;
$z-250: 250;
$z-max: 999999; //为了应付某些插件z-index 值过高的问题
// 全局设置
// --------------------------------------------------
//
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
border: 0 none;
font-size: inherit;
color: inherit;
margin: 0;
padding: 0;
vertical-align: baseline;
/* 在X5新内核Blink中,在排版页面的时候,会主动对字体进行放大,会检测页面中的主字体,当某一块字体在我们的判定规则中,认为字号较小,并且是页面中的主要字体,就会采取主动放大的操作。然而这不是我们想要的,可以采取给最大高度解决 */
max-height: 100000px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
em, strong {
font-style: normal;
}
ul, ol, li {
list-style: none;
}
// 全局盒子模型设置
* {
box-sizing: $box-model;
}
*:before,
*:after {
box-sizing: $box-model;
}
// -webkit-tap-highlight-color 是一个 不规范的属性,它没有出现在 CSS 规范草案中。
// 当用户点击iOS的Safari浏览器中的链接或JavaScript的可点击的元素时,覆盖显示的高亮颜色。
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: $font-family-zh;
line-height: 1.5;
color: $body-color;
background-color: $body-bg;
font-size: 0.24rem;
}
// Links
a {
text-decoration: none;
outline: none;
&:hover,
&:link,
&:focus {
text-decoration: none;
}
&:visited {
}
}
// 暂时放置样式,后期需处理
.homeImg {
display: block;
width: 100%;
}
// 字体颜色
.main-color {
color: $main-color;
}
.color333 {
color: #333
}
.color666 {
color: #666
}
.color999 {
color: #999
}
// 背景颜色
.bg-white { background-color: #fff }
// 间隔
.pt20 {
padding-top: 20px;
}
.pt30 {
padding-top: 30px;
}
.pt40 {
padding-top: 40px;
}
.pt50 {
padding-top: 50px;
}
.pt60 {
padding-top: 60px;
}
.plr20 {
padding-left: 0.2rem;
padding-right: 0.2rem;
}
// 请保证你的设计稿为750px宽,如果有其余字体大小,请在私有样式中设置
.font-20 {font-size: 0.2rem;}
.font-24 {font-size: 0.24rem;}
.font-26 {font-size: 0.26rem;}
.font-28 {font-size: 0.28rem;}
.font-30 {font-size: 0.3rem;}
.font-32 {font-size: 0.32rem;}
.font-34 {font-size: 0.34rem;}
.font-36 {font-size: 0.36rem;}
.font-38 {font-size: 0.38rem;}
.font-40 {font-size: 0.4rem;}
// 设置block
.block {
display: block;
}
.show {
display: inherit;
}
.hide {
display: none;
}
// 最外层页面设置
.box {
max-width: 10rem;
margin-left: auto;
margin-right: auto;
}
// 半透明弹层
.alert-bg {
position: fixed;
z-index: $z-50;
width: 100%;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .6);
display: none; //注意:默认隐藏!!
}
.alpha-bg {
position: fixed;
z-index: 100;
background: rgba(0, 0, 0, .7);
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fixed-bottom {
position: fixed;
z-index: 99;
bottom: 0;
width: 100%;
}
// 布局相关
// 水平
.hor {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
// 水平居中
.hor-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
}
// 垂直居中
.ver-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
}
// 子元素内联垂直居中
.center-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
// 子元素块联水平垂直居中
.center-center-column {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
// 两边对齐
.space-between {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
// last-no-border
.last-no-border:last-child {
border: none;
background: none;
}
// 图片设置
img {
max-width: 100%;
}
.img-responsive {
display: block;
width: 100%;
}
// 这里主要应付 antd-mobile 的组件carousel 不能等比缩放的蛋疼问题
.home-swipe {
height: 40.625vw;
max-height: 406.25px;
}
// 文本控制类
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
// 字符溢出隐藏
.text-overflow-1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// 字符超出一行溢出隐藏
.text-overflow-one {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
// 字符超出两行溢出隐藏
.text-overflow-2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
// 字符超出三行溢出隐藏
.text-overflow-3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
// 浮动控制
.cf {
&:before,
&:after {
content: '';
display: table;
}
&:after {
clear: both;
}
}
.fl {
float: left;
}
.fr {
float: right;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.fixed {
position: fixed;
}
.z-50 {
z-index: 50;
}
.z-100 {
z-index: 100;
}
.z-150 {
z-index: 150;
}
.z-200 {
z-index: 200;
}
.z-250 {
z-index: 250;
}
.z-max {
z-index: 999999;
}
.overflow-h {
overflow: hidden;
}
// 元素绝对定位的垂直水平居中
.absolute-center {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
// radio 样式重写
input[type="radio"] {
position: relative;
vertical-align: middle;
width: 0.36rem;
height: 0.36rem;
-webkit-appearance: none !important;
-moz-appearance: none;
border: none;
background: none;
outline: none;
}
input[type="radio"]:before {
position: absolute;
content: '';
display: block;
width: 0.36rem;
height: 0.36rem;
border: 2px solid #999;
background: #fff;
left: 0;
top: 0;
z-index: 100;
border-radius: 50%;
outline: 0;
}
input[type="radio"]:checked:after {
position: absolute;
z-index: 50;
content: '';
display: block;
width: 0.36rem;
height: 0.36rem;
border: 2px solid #999;
background: #fff;
left: 0;
top: 0;
border-radius: 50%;
outline: 0;
}
input[type="radio"]:checked:before {
position: absolute;
z-index: 100;
content: '';
display: block;
width: 0.18rem;
height: 0.18rem;
left: 0.09rem;
top: 0.09rem;
background: #1abc9c;
border-radius: 50%;
border: none;
}
\ No newline at end of file
// 使用建议
// --------------------------------------------------
// CSS Modules 是对现有的 CSS 做减法。为了追求简单可控,建议遵循如下原则:
// ·不使用选择器(id,伪类,标签等),只使用class名来定义样式
// ·不层叠多个class,只使用一个class把所有样式定义好
// ·所有样式通过 composes 组合来实现复用
// ·不嵌套
// --------------------------------------------------
// 公有样式引入mixins的目的是为了方便默认设置若干常用的样式
// 公有样式不可以使用composes
@import "./variable.scss";
// 颜色设置
$border-color: #e9e9e9; //边框颜色
$body-color: #333; //设置通用的字体颜色
$body-bg: #f2f2f2; //设置通用的 body 背景色
$link-color: #333; //设置通用的链接颜色
$link-visited: #333; //设置链接访问后的颜色
// 字体
$font-family-zh: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
$font-family-en: Arial, sans-serif !default;
// 盒子模型
$box-model: border-box !default;
// z-index
$z-50: 50;
$z-100: 100;
$z-150: 150;
$z-200: 200;
$z-250: 250;
$z-max: 999999; //为了应付某些插件z-index 值过高的问题
// 全局设置
// --------------------------------------------------
//
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
border: 0 none;
font-size: inherit;
color: inherit;
margin: 0;
padding: 0;
vertical-align: baseline;
/* 在X5新内核Blink中,在排版页面的时候,会主动对字体进行放大,会检测页面中的主字体,当某一块字体在我们的判定规则中,认为字号较小,并且是页面中的主要字体,就会采取主动放大的操作。然而这不是我们想要的,可以采取给最大高度解决 */
max-height: 100000px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
em, strong {
font-style: normal;
}
ul, ol, li {
list-style: none;
}
// 全局盒子模型设置
* {
box-sizing: $box-model;
}
*:before,
*:after {
box-sizing: $box-model;
}
// -webkit-tap-highlight-color 是一个 不规范的属性,它没有出现在 CSS 规范草案中。
// 当用户点击iOS的Safari浏览器中的链接或JavaScript的可点击的元素时,覆盖显示的高亮颜色。
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: $font-family-zh;
line-height: 1.5;
color: $body-color;
background-color: $body-bg;
font-size: 0.24rem;
}
// Links
a {
text-decoration: none;
outline: none;
&:hover,
&:link,
&:focus {
text-decoration: none;
}
&:visited {
}
}
// 暂时放置样式,后期需处理
.homeImg {
display: block;
width: 100%;
}
// 字体颜色
.main-color {
color: $main-color;
}
.color333 {
color: #333
}
.color666 {
color: #666
}
.color999 {
color: #999
}
// 背景颜色
.bg-white { background-color: #fff }
// 间隔
.pt20 {
padding-top: 20px;
}
.pt30 {
padding-top: 30px;
}
.pt40 {
padding-top: 40px;
}
.pt50 {
padding-top: 50px;
}
.pt60 {
padding-top: 60px;
}
.plr20 {
padding-left: 0.2rem;
padding-right: 0.2rem;
}
// 请保证你的设计稿为750px宽,如果有其余字体大小,请在私有样式中设置
.font-20 {font-size: 0.2rem;}
.font-24 {font-size: 0.24rem;}
.font-26 {font-size: 0.26rem;}
.font-28 {font-size: 0.28rem;}
.font-30 {font-size: 0.3rem;}
.font-32 {font-size: 0.32rem;}
.font-34 {font-size: 0.34rem;}
.font-36 {font-size: 0.36rem;}
.font-38 {font-size: 0.38rem;}
.font-40 {font-size: 0.4rem;}
// 设置block
.block {
display: block;
}
.show {
display: inherit;
}
.hide {
display: none;
}
// 最外层页面设置
.box {
max-width: 10rem;
margin-left: auto;
margin-right: auto;
}
// 半透明弹层
.alert-bg {
position: fixed;
z-index: $z-50;
width: 100%;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .6);
display: none; //注意:默认隐藏!!
}
.alpha-bg {
position: fixed;
z-index: 100;
background: rgba(0, 0, 0, .7);
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fixed-bottom {
position: fixed;
z-index: 99;
bottom: 0;
width: 100%;
}
// 布局相关
// 水平
.hor {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
// 水平居中
.hor-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
}
// 垂直居中
.ver-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
}
// 子元素内联垂直居中
.center-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
// 子元素块联水平垂直居中
.center-center-column {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
// 两边对齐
.space-between {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
// last-no-border
.last-no-border:last-child {
border: none;
background: none;
}
// 图片设置
img {
max-width: 100%;
}
.img-responsive {
display: block;
width: 100%;
}
// 这里主要应付 antd-mobile 的组件carousel 不能等比缩放的蛋疼问题
.home-swipe {
height: 40.625vw;
max-height: 406.25px;
}
// 文本控制类
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
// 字符溢出隐藏
.text-overflow-1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// 字符超出一行溢出隐藏
.text-overflow-one {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
// 字符超出两行溢出隐藏
.text-overflow-2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
// 字符超出三行溢出隐藏
.text-overflow-3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
// 浮动控制
.cf {
&:before,
&:after {
content: '';
display: table;
}
&:after {
clear: both;
}
}
.fl {
float: left;
}
.fr {
float: right;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.fixed {
position: fixed;
}
.z-50 {
z-index: 50;
}
.z-100 {
z-index: 100;
}
.z-150 {
z-index: 150;
}
.z-200 {
z-index: 200;
}
.z-250 {
z-index: 250;
}
.z-max {
z-index: 999999;
}
.overflow-h {
overflow: hidden;
}
// 元素绝对定位的垂直水平居中
.absolute-center {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
// radio 样式重写
input[type="radio"] {
position: relative;
vertical-align: middle;
width: 0.36rem;
height: 0.36rem;
-webkit-appearance: none !important;
-moz-appearance: none;
border: none;
background: none;
outline: none;
}
input[type="radio"]:before {
position: absolute;
content: '';
display: block;
width: 0.36rem;
height: 0.36rem;
border: 2px solid #999;
background: #fff;
left: 0;
top: 0;
z-index: 100;
border-radius: 50%;
outline: 0;
}
input[type="radio"]:checked:after {
position: absolute;
z-index: 50;
content: '';
display: block;
width: 0.36rem;
height: 0.36rem;
border: 2px solid #999;
background: #fff;
left: 0;
top: 0;
border-radius: 50%;
outline: 0;
}
input[type="radio"]:checked:before {
position: absolute;
z-index: 100;
content: '';
display: block;
width: 0.18rem;
height: 0.18rem;
left: 0.09rem;
top: 0.09rem;
background: #1abc9c;
border-radius: 50%;
border: none;
}
\ No newline at end of file
// 使用建议
// --------------------------------------------------
// CSS Modules 是对现有的 CSS 做减法。为了追求简单可控,建议遵循如下原则:
// ·不使用选择器(id,伪类,标签等),只使用class名来定义样式
// ·不层叠多个class,只使用一个class把所有样式定义好
// ·所有样式通过 composes 组合来实现复用
// ·不嵌套
// --------------------------------------------------
// 公有样式引入mixins的目的是为了方便默认设置若干常用的样式
// 公有样式不可以使用composes
@import "./variable.scss";
// 颜色设置
$border-color: #e9e9e9; //边框颜色
$body-color: #333; //设置通用的字体颜色
$body-bg: #f2f2f2; //设置通用的 body 背景色
$link-color: #333; //设置通用的链接颜色
$link-visited: #333; //设置链接访问后的颜色
$main-color: #09f; //主体颜色
// 字体
$font-family-zh: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
$font-family-en: Arial, sans-serif !default;
// 盒子模型
$box-model: border-box !default;
// z-index
$z-50: 50;
$z-100: 100;
$z-150: 150;
$z-200: 200;
$z-250: 250;
$z-max: 999999; //为了应付某些插件z-index 值过高的问题
// 全局设置
// --------------------------------------------------
//
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
border: 0 none;
font-size: inherit;
color: inherit;
margin: 0;
padding: 0;
vertical-align: baseline;
/* 在X5新内核Blink中,在排版页面的时候,会主动对字体进行放大,会检测页面中的主字体,当某一块字体在我们的判定规则中,认为字号较小,并且是页面中的主要字体,就会采取主动放大的操作。然而这不是我们想要的,可以采取给最大高度解决 */
max-height: 100000px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
em, strong {
font-style: normal;
}
ul, ol, li {
list-style: none;
}
// 全局盒子模型设置
* {
box-sizing: $box-model;
}
*:before,
*:after {
box-sizing: $box-model;
}
// -webkit-tap-highlight-color 是一个 不规范的属性,它没有出现在 CSS 规范草案中。
// 当用户点击iOS的Safari浏览器中的链接或JavaScript的可点击的元素时,覆盖显示的高亮颜色。
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: $font-family-zh;
line-height: 1.5;
color: $body-color;
background-color: $body-bg;
font-size: 0.24rem;
}
// Links
a {
text-decoration: none;
outline: none;
&:hover,
&:link,
&:focus {
text-decoration: none;
}
&:visited {
}
}
// 暂时放置样式,后期需处理
.homeImg {
display: block;
width: 100%;
}
// 字体颜色
.main-color {
color: $main-color;
}
.color333 {
color: #333
}
.color666 {
color: #666
}
.color999 {
color: #999
}
// 背景颜色
.bg-white { background-color: #fff }
// 间隔
.pt20 {
padding-top: 20px;
}
.pt30 {
padding-top: 30px;
}
.pt40 {
padding-top: 40px;
}
.pt50 {
padding-top: 50px;
}
.pt60 {
padding-top: 60px;
}
.plr20 {
padding-left: 0.2rem;
padding-right: 0.2rem;
}
// 请保证你的设计稿为750px宽,如果有其余字体大小,请在私有样式中设置
.font-20 {font-size: 0.2rem;}
.font-24 {font-size: 0.24rem;}
.font-26 {font-size: 0.26rem;}
.font-28 {font-size: 0.28rem;}
.font-30 {font-size: 0.3rem;}
.font-32 {font-size: 0.32rem;}
.font-34 {font-size: 0.34rem;}
.font-36 {font-size: 0.36rem;}
.font-38 {font-size: 0.38rem;}
.font-40 {font-size: 0.4rem;}
// 设置block
.block {
display: block;
}
.show {
display: inherit;
}
.hide {
display: none;
}
// 最外层页面设置
.box {
max-width: 10rem;
margin-left: auto;
margin-right: auto;
}
// 半透明弹层
.alert-bg {
position: fixed;
z-index: $z-50;
width: 100%;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .6);
display: none; //注意:默认隐藏!!
}
.alpha-bg {
position: fixed;
z-index: 100;
background: rgba(0, 0, 0, .7);
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fixed-bottom {
position: fixed;
z-index: 99;
bottom: 0;
width: 100%;
}
// 布局相关
// 水平
.hor {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
// 水平居中
.hor-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
}
// 垂直居中
.ver-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
}
// 子元素内联垂直居中
.center-center {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
// 子元素块联水平垂直居中
.center-center-column {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
// 两边对齐
.space-between {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
// last-no-border
.last-no-border:last-child {
border: none;
background: none;
}
// 图片设置
img {
max-width: 100%;
}
.img-responsive {
display: block;
width: 100%;
}
// 这里主要应付 antd-mobile 的组件carousel 不能等比缩放的蛋疼问题
.home-swipe {
height: 40.625vw;
max-height: 406.25px;
}
// 文本控制类
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
// 字符溢出隐藏
.text-overflow-1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// 字符超出一行溢出隐藏
.text-overflow-one {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
// 字符超出两行溢出隐藏
.text-overflow-2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
// 字符超出三行溢出隐藏
.text-overflow-3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
// 浮动控制
.cf {
&:before,
&:after {
content: '';
display: table;
}
&:after {
clear: both;
}
}
.fl {
float: left;
}
.fr {
float: right;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.fixed {
position: fixed;
}
.z-50 {
z-index: 50;
}
.z-100 {
z-index: 100;
}
.z-150 {
z-index: 150;
}
.z-200 {
z-index: 200;
}
.z-250 {
z-index: 250;
}
.z-max {
z-index: 999999;
}
.overflow-h {
overflow: hidden;
}
// 元素绝对定位的垂直水平居中
.absolute-center {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
// radio 样式重写
input[type="radio"] {
position: relative;
vertical-align: middle;
width: 0.36rem;
height: 0.36rem;
-webkit-appearance: none !important;
-moz-appearance: none;
border: none;
background: none;
outline: none;
}
input[type="radio"]:before {
position: absolute;
content: '';
display: block;
width: 0.36rem;
height: 0.36rem;
border: 2px solid #999;
background: #fff;
left: 0;
top: 0;
z-index: 100;
border-radius: 50%;
outline: 0;
}
input[type="radio"]:checked:after {
position: absolute;
z-index: 50;
content: '';
display: block;
width: 0.36rem;
height: 0.36rem;
border: 2px solid #999;
background: #fff;
left: 0;
top: 0;
border-radius: 50%;
outline: 0;
}
input[type="radio"]:checked:before {
position: absolute;
z-index: 100;
content: '';
display: block;
width: 0.18rem;
height: 0.18rem;
left: 0.09rem;
top: 0.09rem;
background: #1abc9c;
border-radius: 50%;
border: none;
}
\ No newline at end of file
/*
* @ 文字颜色
*/
$white: #fff;
$black: #000;
$active: #09f;
$color_333: #333;
$color_666: #666;
$color_999: #999;
$color_0b0050: #0b0050;
$color_290: #29058c;
$color_470bc8: #470bc8;
$color_ff4f40: #ff4f40;
/*
* @ 文字大小
*/
$font_30: 30px;
$font_28: 28px;
$font_26: 26px;
$font_24: 24px;
$font_22: 22px;
$font_20: 20px;
$font_18: 18px;
$font_16: 16px;
$font_14: 14px;
$font_12: 12px;
\ No newline at end of file
/*
* @ 文字颜色
*/
$white: #fff;
$black: #000;
$active: #09f;
$color_333: #333;
$color_666: #666;
$color_999: #999;
$color_0b0050: #0b0050;
$color_290: #29058c;
$color_470bc8: #470bc8;
$color_ff4f40: #ff4f40;
/*
* @ 文字大小
*/
$font_30: 30px;
$font_28: 28px;
$font_26: 26px;
$font_24: 24px;
$font_22: 22px;
$font_20: 20px;
$font_18: 18px;
$font_16: 16px;
$font_14: 14px;
$font_12: 12px;
/*
* @ 背景颜色
*/
$bg_f4f4f4: #f4f4f4;
$bg_ffda09: #ffda09;
$bg_0b0050: #0b0050;
$bg_fadc7f: #fadc7f;
$bg_f7f4ff: #f7f4ff;
$bg_29058c: #29058c;
$bg_0f0070: #0f0070;
$bg_fefdfb: #fefdfb;
/*
* @ 文字颜色
*/
$white: #fff;
$black: #000;
$color_active: #09f;
$color_333: #333;
$color_666: #666;
$color_999: #999;
$color_0b0050: #0b0050;
$color_290: #29058c;
$color_470bc8: #470bc8;
$color_ff4f40: #ff4f40;
/*
* @ 文字大小
*/
$font_30: 30px;
$font_28: 28px;
$font_26: 26px;
$font_24: 24px;
$font_22: 22px;
$font_20: 20px;
$font_18: 18px;
$font_16: 16px;
$font_14: 14px;
$font_12: 12px;
/*
* @ 背景颜色
*/
$bg_f4f4f4: #f4f4f4;
$bg_ffda09: #ffda09;
$bg_0b0050: #0b0050;
$bg_fadc7f: #fadc7f;
$bg_f7f4ff: #f7f4ff;
$bg_29058c: #29058c;
$bg_0f0070: #0f0070;
$bg_fefdfb: #fefdfb;
/*
* @ 文字颜色
*/
$white: #fff;
$black: #000;
$color_333: #333;
$color_666: #666;
$color_999: #999;
/*
* @ 文字大小
*/
$font_30: 30px;
$font_28: 28px;
$font_26: 26px;
$font_24: 24px;
$font_22: 22px;
$font_20: 20px;
$font_18: 18px;
$font_16: 16px;
$font_14: 14px;
$font_12: 12px;
/*
* @ 背景颜色
*/
$bg_f4f4f4: #f4f4f4;
$bg_ffda09: #ffda09;
$bg_0b0050: #0b0050;
$bg_fadc7f: #fadc7f;
$bg_f7f4ff: #f7f4ff;
$bg_29058c: #29058c;
$bg_0f0070: #0f0070;
$bg_fefdfb: #fefdfb;
/*
* @ 文字颜色
*/
$white: #fff;
$black: #000;
$color_333: #333;
$color_666: #666;
$color_999: #999;
/*
* @ 文字大小
*/
$font_30: 30px;
$font_28: 28px;
$font_26: 26px;
$font_24: 24px;
$font_22: 22px;
$font_20: 20px;
$font_18: 18px;
$font_16: 16px;
$font_14: 14px;
$font_12: 12px;
/*
* @ 背景颜色
*/
$bg_active: #09f;
$bg_f4f4f4: #f4f4f4;
/*
* @ 文字颜色
*/
$white: #fff;
$black: #000;
$color_333: #333;
$color_666: #666;
$color_999: #999;
/*
* @ 文字大小
*/
$font_30: 30px;
$font_28: 28px;
$font_26: 26px;
$font_24: 24px;
$font_22: 22px;
$font_20: 20px;
$font_18: 18px;
$font_16: 16px;
$font_14: 14px;
$font_12: 12px;
/*
* @ 背景颜色
*/
$bg_active: #09f;
$bg_f4f4f4: #f4f4f4;
$body-bg: #f2f2f2; //设置通用的 body 背景色
/*
* @ 文字颜色
*/
$border-color: #e9e9e9; //边框颜色
$body-color: #333; //设置通用的字体颜色
$link-color: #333; //设置通用的链接颜色
$link-visited: #333; //设置链接访问后的颜色
/*
* @ 边框颜色
*/
/*
* @ 文字颜色
*/
......@@ -423,7 +423,7 @@ module.exports = function(webpackEnv) {
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true
modules: false
},
'sass-loader'
),
......
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import styles from './index.scss'
import './index.scss'
export default class NavLinks extends Component {
render() {
......@@ -10,10 +10,10 @@ export default class NavLinks extends Component {
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
className={"root-item"}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
<i className={icoName} />
<span className={"text"}>{linkName}</span>
</NavLink>
)
}
......
.root {
.root-item {
flex: auto;
display: flex;
flex-direction: column;
......
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
import './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<div className="root">
<NavLink
pathUrl="/"
exact
icoName={"i-zhuye42un"}
active={styles.navOne}
icoName={"iconfont iconshouye"}
active={"navOne"}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
icoName="iconfont iconiconfront-16"
active={"navTwo"}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
icoName="iconfont iconxuexi"
active={"navThree"}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
icoName="iconfont iconhome"
active={"navFour"}
linkName="我的"
/>
</div>
......
......@@ -15,22 +15,8 @@
color: #09f;
}
}
.navOne i:before {
content: "\e93d";
}
.navTwo i:before {
content: "\e917";
}
.navThree i:before {
content: "\e936";
}
.navFour i:before {
content: "\e939";
}
.navFive i:before {
content: "\e913";
.iconfont{
font-size: 24px !important;
margin-bottom: 4px;
}
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -4,8 +4,10 @@ import ReactDOM from 'react-dom';
import Router from './router';
// import { Provider } from 'react-redux';
// 默认样式
import './styles/index.scss';
// import App from './App';
// iconfont
import './font/iconfont.css';
ReactDOM.render(
<Router />,
......
......@@ -9,7 +9,7 @@
// 公有样式引入mixins的目的是为了方便默认设置若干常用的样式
// 公有样式不可以使用composes
// @import "./mixins.scss";
@import "./variable.scss";
// 颜色设置
$border-color: #e9e9e9; //边框颜色
......@@ -17,7 +17,7 @@ $body-color: #333; //设置通用的字体颜色
$body-bg: #f2f2f2; //设置通用的 body 背景色
$link-color: #333; //设置通用的链接颜色
$link-visited: #333; //设置链接访问后的颜色
$main-color: #1BBC9B; //主体颜色
$main-color: #09f; //主体颜色
// 字体
$font-family-zh: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
......
/*
* @ 文字颜色
*/
$white: #fff;
$black: #000;
$color_333: #333;
$color_666: #666;
$color_999: #999;
/*
* @ 文字大小
*/
$font_30: 30px;
$font_28: 28px;
$font_26: 26px;
$font_24: 24px;
$font_22: 22px;
$font_20: 20px;
$font_18: 18px;
$font_16: 16px;
$font_14: 14px;
$font_12: 12px;
/*
* @ 背景颜色
*/
$bg_active: #09f;
$bg_f4f4f4: #f4f4f4;
$body-bg: #f2f2f2; //设置通用的 body 背景色
/*
* @ 文字颜色
*/
$border-color: #e9e9e9; //边框颜色
$body-color: #333; //设置通用的字体颜色
$link-color: #333; //设置通用的链接颜色
$link-visited: #333; //设置链接访问后的颜色
/*
* @ 边框颜色
*/
/*
* @ 文字颜色
*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment