项目中用到的基础样式

/**常量, 以下为最终版**/
//基础颜色
//基础字号 字体尺寸大小
@smallSize:24rem;
@size:28rem;
@largeSize:32rem;
@xLargeSize:48rem;

//基础颜色  即字体的颜色F
@whiteFont: #ffffff;
@grayFont-1: #C7C7C7;
@grayFont-2: #999999;
@grayFont-3: #666666;
@grayFont-4: #333333;
@grayFont-5: #DCDEE3;
@grayFont-6: #3D4145;
@grayFont-7: #E6E7EB;
@grayFont-8: #5F646E;
@grayFont-9: #9E9E9E;
@grayFont-10: #3F3F3F;
@redFont-1: #f54531;
@redFont-2: #f21800;
@redFont-3: #FFF6F5;
@redFont-4: #FF724F;
@redFont-5: #EE4443;
@redFont-6: #F23C3C;
@redFont-7: #FAE7E7;
@redFont-8: #E41010;
@redFont-9: #FD5A5C;
@yellowFont-1: #FFA033;
@yellowFont-2: #FFE2D0;
@yellowFont-3: #F48608;
@yellowFont-4: #FFA033;
@greenFont-1: #1DC11D;
@redIconColor: #F55358;
@blueColor: #0891FB;
// 背景颜色
@bg-1: #FFFFFF;
@bg-2: #F7F8FA;
@grayBg: #F7F8FA;
@whiteBg: #FFFFFF;
@bg-3: #EFF0F4;
@bg-4: #EBECF0;
@bg-5: #F2F3F7;
@bg-6: #F8E71C;
@bg-7: #EAEBF0;
//边框颜色
@borderColor: #e6e7eb;
@borderColor1: #C4C6CF;
@borderColor2: #F54531;
@borderColor3: #DFDFDF;

//
/**
    *基础布局  ,鉴于手机端qap 全是基于flex  故布局就几种组合,定义好直接用即可
    *以rowStartCenter 为例  row代表横向 ;第二个参数表示横向的布局  start代表从左侧排列   end 代表从右向左  between  表示space-between 两头分布
      around    表示space-around 即均匀评分  ;但三个参数表示竖向排列 ,与第二的意义一样
 */

.rowBetweenCenter{
    //横向排 ,横向左起,竖向居中
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}.rowStartCenter{
     //横向排 ,横向左起,竖向居中
     flex-direction: row;
     justify-content: flex-start;
     align-items: center;
 }
.rowEndCenter{
    //横向排 ,横向右起,竖向居中
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
}
 .rowStartStart{
     //横向排 ,横向左起,竖向上起
     flex-direction: row;
     justify-content: flex-start;
     align-items: flex-start;
 }
.rowCenterCenter{
    //横向排 ,横向居中,竖向居中
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
.rowAroundCenter{
    //横向排 ,横向居中,竖向居中
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}
.rowAroundEnd{
    //横向排 ,横向均分空白,竖向居下
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-end;
}
.rowRightCenter{
    //横向排 ,横向左起,竖向居中
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
}
.columnStartCenter{
    //竖向排 ,横向左起,竖向居中
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.columnStartBetween{
    //竖向排 ,横向左起,竖向两端
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}
.columnStartStart{
    //竖向排 ,横向左起,竖向上起
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}
.columnCenterStart{
    //竖向排 ,横向左起,竖向上起
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}
.columnCenterEnd{
    //竖向排 ,横向左起,竖向上起
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}
.columnCenterCenter{
    //竖向排 ,横向居中,竖向居中
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/**
    常用的文字  大小以及行高
 */
.font-10{
    font-size: 20rem;
    line-height: 30rem;
}
.font-12{
    font-size: @smallSize;
    line-height: 36rem;
}
.font-14{
    font-size: @size;
    line-height: 40rem;
}
.font-16{
    font-size: @largeSize;
    line-height: 44rem;
}

.font-18{
    font-size: 36rem;
    line-height: 48rem;
}
/**
    页面布局常用样式
 */
.container{
    //几乎每个页的总View 都用这个,保证页面的大小和全面屏适配
    flex: 1;
    justify-content:flex-start ;
    align-items: flex-start;
    background-color: @grayBg;
    width:750rem;
    flex-direction: column;
}

.flex750{
    //很多组件都需要继承宽度占满全屏,这样保证兼容性
    flex: 1;
    width: 750rem;

}
/**
tab切换激活
 */
.activeBorder {
    border-bottom: 2rem solid @redFont-1;
}
/**
tab内部样式
 */
.inactiveBorder {
    border-bottom: 1px solid @grayFont-5;
}
//所有的长列表的下拉刷新样式
.refresh{
    height:80rem;
    width:750rem;
    justify-content:center;
    align-items:center;
}
//所有的长列表的下拉刷新样式
.loading{
    height:80rem;
    display:flex;
    width:750rem;
   .rowCenterCenter();
    background-color:@bg-2 ;
}
//列表加载中
.loadingText{
    color:@grayFont-2;
    .font-12();
}
//
.myCheckBox{

}
//被选中的checkBox
.checkedCheckBox{
    border-color:@redFont-1 ;
    background-color: @redFont-1;
    color: @whiteFont;
}
.checkedCheckBox1{
    border: 2rem solid @redFont-1;
    background-color: @whiteFont;
    color: @redFont-1;
}
//黄色的标签页
.tagYellow{
    font-size: 20rem;color: @yellowFont-4;
    height: 32rem;padding: 0  8rem;
    border:  1px solid @yellowFont-4;border-radius: 4rem;
    .rowCenterCenter();
}
//绿色的标签页
.tagGreen{
    .tagYellow();
    color: @greenFont-1;
    border:  1px solid  @greenFont-1;
}
//红色的标签页
.tagRed{
    .tagYellow();
    color: @redFont-6;
    border:  1px solid @redFont-6;
}
.greenTagFont{
    font-size: 20rem;color: @greenFont-1;line-height: 26rem;
}
.yellowTagFont{
    font-size: 20rem;color: @yellowFont-4;line-height: 26rem;
}
.redTagFont{
    font-size: 20rem;color: @redFont-6;line-height: 26rem;
}
.gradientBg1{
    background-image: linear-gradient("to right", @redFont-4, @redFont-4); /* Safari 5.1 - 6.0 */
}
//常用的一些字
.darkFont{
    color:@grayFont-6;
    .font-14();
};
.grayFont{
    color:@grayFont-2;
    .font-14();
};
.smallGrayFont{
    color:@grayFont-2;
    .font-12();
};
.smallDarkFont{
    color:@grayFont-6;
    .font-12();
};
.largeDarkFont{
    color:@grayFont-6;
    .font-16();
};
.largeGrayFont{
    color: @grayFont-2;;
    .font-16();
};
.largeRedFont{
    color:@redFont-6;
    .font-16();
};
.xLargeFont{
    .font-18();
}
//各种边框
.border{
   border:1rem solid @borderColor1
}
.borderLeft{
    border-left:1rem solid @borderColor1
}
.borderRight{
    border-right:1rem solid @borderColor1
}
//边框
.bottomBorder{
    border-bottom:1rem solid @borderColor1
}
.bottomTop{
    border-top:1rem solid @borderColor1
}
//边框
.bottomBorderCommon{
    border-bottom:1rem solid @borderColor
}
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,088评论 5 459
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,715评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,361评论 0 319
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,099评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 60,987评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,063评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,486评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,175评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,440评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,518评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,305评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,190评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,550评论 3 298
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,880评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,152评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,451评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,637评论 2 335

推荐阅读更多精彩内容