m_tab.less
1.39 KB
1
2
3
4
5
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
69
70
71
72
73
74
75
76
77
78
/***************************************************
* feature : tab选项卡切换;
* update : 2015/02/03;
* use : ;
* extend : ;
* example : ;
* desc : ;
* feedback : 此处填入 issue, 并请附带以下信息[os_version, browser_version, page_path, issue_description]
* - demo => [windows 7, IE 8, http://diligrp.com/icon.html, 在不定height下未能垂直居中];
****************************************************/
@import "var";
.m-tab{
width: 100%;
background-color: #FFF;
font-size: 14px;
color: #999;
border: 1px solid #ddd;
border-width: 1px 0;
overflow: hidden;
box-sizing: border-box;
padding: 0 15px;
&.solid {
padding: 0px;
width: 60%;
margin: 0 auto;
height: 35px;
position: relative;
top: 5px;
border: 1px solid #2caa3f;
color: #2caa3f;
li {
line-height: 35px;
width: 50%;
padding: 0px;
}
.on {
background: #2caa3f;
color: #fff;
}
}
a{
color: #999;
}
li{
float: left;
min-width: 32px;
padding-right: 18px;
line-height: 40px;
text-align: center;
position: relative;
&:last-child{
padding-right: 0;
}
}
.on{
a{
color: #2caa3f;
display: block;
position: relative;
&:after{
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background-color: #2caa3f;
}
}
}
&.tab-col-2{
li{
width: 50% !important;
}
}
}