項目中用到的基礎(chǔ)樣式

/**常量, 以下為最終版**/
//基礎(chǔ)顏色
//基礎(chǔ)字號 字體尺寸大小
@smallSize:24rem;
@size:28rem;
@largeSize:32rem;
@xLargeSize:48rem;

//基礎(chǔ)顏色  即字體的顏色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;

//
/**
    *基礎(chǔ)布局  签餐,鑒于手機端qap 全是基于flex  故布局就幾種組合太示,定義好直接用即可
    *以rowStartCenter 為例  row代表橫向 土居;第二個參數(shù)表示橫向的布局  start代表從左側(cè)排列   end 代表從右向左  between  表示space-between 兩頭分布
      around    表示space-around 即均勻評分  暂幼;但三個參數(shù)表示豎向排列 眼滤,與第二的意義一樣
 */

.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內(nèi)部樣式
 */
.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;
}
//黃色的標(biāo)簽頁
.tagYellow{
    font-size: 20rem;color: @yellowFont-4;
    height: 32rem;padding: 0  8rem;
    border:  1px solid @yellowFont-4;border-radius: 4rem;
    .rowCenterCenter();
}
//綠色的標(biāo)簽頁
.tagGreen{
    .tagYellow();
    color: @greenFont-1;
    border:  1px solid  @greenFont-1;
}
//紅色的標(biāo)簽頁
.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
}
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末链峭,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子疑苫,更是在濱河造成了極大的恐慌熏版,老刑警劉巖纷责,帶你破解...
    沈念sama閱讀 218,122評論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異撼短,居然都是意外死亡再膳,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,070評論 3 395
  • 文/潘曉璐 我一進店門曲横,熙熙樓的掌柜王于貴愁眉苦臉地迎上來喂柒,“玉大人,你說我怎么就攤上這事禾嫉≡纸埽” “怎么了?”我有些...
    開封第一講書人閱讀 164,491評論 0 354
  • 文/不壞的土叔 我叫張陵熙参,是天一觀的道長艳吠。 經(jīng)常有香客問我,道長孽椰,這世上最難降的妖魔是什么昭娩? 我笑而不...
    開封第一講書人閱讀 58,636評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮黍匾,結(jié)果婚禮上栏渺,老公的妹妹穿的比我還像新娘。我一直安慰自己锐涯,他們只是感情好磕诊,可當(dāng)我...
    茶點故事閱讀 67,676評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著纹腌,像睡著了一般霎终。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上升薯,一...
    開封第一講書人閱讀 51,541評論 1 305
  • 那天神僵,我揣著相機與錄音,去河邊找鬼覆劈。 笑死,一個胖子當(dāng)著我的面吹牛沛励,可吹牛的內(nèi)容都是我干的责语。 我是一名探鬼主播,決...
    沈念sama閱讀 40,292評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼目派,長吁一口氣:“原來是場噩夢啊……” “哼坤候!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起企蹭,我...
    開封第一講書人閱讀 39,211評論 0 276
  • 序言:老撾萬榮一對情侶失蹤白筹,失蹤者是張志新(化名)和其女友劉穎智末,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體徒河,經(jīng)...
    沈念sama閱讀 45,655評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡系馆,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,846評論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了顽照。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片由蘑。...
    茶點故事閱讀 39,965評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖代兵,靈堂內(nèi)的尸體忽然破棺而出尼酿,到底是詐尸還是另有隱情,我是刑警寧澤植影,帶...
    沈念sama閱讀 35,684評論 5 347
  • 正文 年R本政府宣布裳擎,位于F島的核電站,受9級特大地震影響思币,放射性物質(zhì)發(fā)生泄漏鹿响。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,295評論 3 329
  • 文/蒙蒙 一支救、第九天 我趴在偏房一處隱蔽的房頂上張望抢野。 院中可真熱鬧,春花似錦各墨、人聲如沸指孤。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,894評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽恃轩。三九已至,卻和暖如春黎做,著一層夾襖步出監(jiān)牢的瞬間叉跛,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,012評論 1 269
  • 我被黑心中介騙來泰國打工蒸殿, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留筷厘,地道東北人。 一個月前我還...
    沈念sama閱讀 48,126評論 3 370
  • 正文 我出身青樓宏所,卻偏偏與公主長得像酥艳,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子爬骤,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,914評論 2 355

推薦閱讀更多精彩內(nèi)容