ant-design/style/components/tab.less

233 lines
5.0 KiB
Plaintext
Raw Normal View History

2015-06-09 15:34:46 +08:00
@prefixClass: rc-tabs;
2015-06-10 19:50:02 +08:00
2015-06-09 15:34:46 +08:00
@easing-in-out: cubic-bezier(0.35, 0, 0.25, 1);
2015-06-10 19:50:02 +08:00
@effect-duration: .3s;
2015-06-09 15:34:46 +08:00
.@{prefixClass} {
outline: none;
box-sizing: border-box;
2015-06-10 19:50:02 +08:00
border-bottom: 2px solid #f3f3f3;
2015-06-09 15:34:46 +08:00
position: relative;
2015-06-10 19:50:02 +08:00
@font-face {
font-family: 'iconfont';
src: url('//at.alicdn.com/t/font_1429685559_5814753.eot');
/* IE9*/
src: url('//at.alicdn.com/t/font_1429685559_5814753.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('//at.alicdn.com/t/font_1429685559_5814753.woff') format('woff'), /* chrome、firefox */ url('//at.alicdn.com/t/font_1429685559_5814753.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('//at.alicdn.com/t/font_1429685559_5814753.svg#iconfont') format('svg');
/* iOS 4.1- */
}
2015-06-09 15:34:46 +08:00
&-ink-bar {
z-index: 1;
position: absolute;
left: 0;
2015-06-10 19:50:02 +08:00
bottom: 0;
2015-06-09 15:34:46 +08:00
box-sizing: border-box;
2015-06-10 19:50:02 +08:00
height: 4px;
margin-top: -3px;
2015-06-09 15:34:46 +08:00
background-color: #3fc7fa;
transform: scaleX(1);
transform-origin: 0 0;
2015-06-10 19:50:02 +08:00
&-transition-forward {
2015-06-09 15:34:46 +08:00
transition: right 0.3s @easing-in-out,
left 0.3s @easing-in-out 0.3s * 0.3;
}
2015-06-10 19:50:02 +08:00
&-transition-backward {
2015-06-09 15:34:46 +08:00
transition: right 0.3s @easing-in-out 0.3s * 0.3,
left 0.3s @easing-in-out;
}
}
&-nav-container {
font-size: 14px;
line-height: 1.5;
box-sizing: border-box;
width: 100%;
overflow: hidden;
position: relative;
white-space: nowrap;
padding-left: 32px;
padding-right: 32px;
2015-06-10 19:50:02 +08:00
border-bottom: 2px solid #f3f3f3;
2015-06-09 15:34:46 +08:00
}
&-tab-prev, &-tab-next {
user-select: none;
-webkit-user-select: none;
z-index: 1;
margin-right: -2px;
width: 32px;
height: 100%;
line-height: 36px;
cursor: pointer;
border: none;
background-color: transparent;
position: absolute;
&-icon {
position: relative;
display: inline-block;
font-style: normal;
font-weight: normal;
font-variant: normal;
line-height: inherit;
vertical-align: baseline;
text-align: center;
text-transform: none;
-webkit-font-smoothing: antialiased;
2015-06-10 19:50:02 +08:00
-webkit-text-stroke-width: 0;
2015-06-09 15:34:46 +08:00
-moz-osx-font-smoothing: grayscale;
font-family: sans-serif;
&:before {
display: block;
font-family: "iconfont" !important;
}
}
}
&-tab-next {
right: 2px;
&-icon:before {
content: "\e651";
}
}
&-tab-prev {
left: 0;
transform: rotate(180deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
&-icon:before {
content: "\e651";
}
}
&-nav-wrap {
width: 100%;
overflow: hidden;
}
&-nav-scroll {
width:99999px;
}
&-nav {
height: 36px;
box-sizing: border-box;
padding-left: 0;
transition: left 0.5s @easing-in-out;
position: relative;
margin: 0;
list-style: none;
display: inline-block;
&:before, &:after {
display: table;
content: " ";
}
&:after {
clear: both;
}
div.@{prefixClass}-tab-active {
> a, > a:hover, > a:focus {
color: #3fc7fa;
cursor: default;
text-decoration: none;
}
}
div.@{prefixClass}-tab-disabled {
pointer-events: none;
cursor: default;
color: #ccc;
}
.@{prefixClass}-tab {
float: left;
height: 100%;
padding: 10px 20px;
margin-right: 30px;
box-sizing: border-box;
position: relative;
display: block;
> a {
transition: color 0.3s @easing-in-out;
2015-06-10 19:50:02 +08:00
margin-bottom: 4px;
2015-06-09 15:34:46 +08:00
font-weight: 500;
display: inline-block;
}
> a:hover {
color: #23c0fa;
cursor: pointer;
}
> a:hover, > a:focus {
text-decoration: none;
}
}
}
&-tabpane-hidden {
display: none;
}
&-content {
position: relative;
width: 100%;
overflow: hidden;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-enter {
2015-06-09 15:34:46 +08:00
transform: translateX(-100%);
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active {
2015-06-09 15:34:46 +08:00
transform: translateX(0);
transition: transform @effect-duration @easing-in-out;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-leave {
2015-06-09 15:34:46 +08:00
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
transform: translateX(0);
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-leave&-slide-horizontal-backward-leave-active {
2015-06-09 15:34:46 +08:00
transform: translateX(100%);
transition: transform @effect-duration @easing-in-out;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-enter {
2015-06-09 15:34:46 +08:00
transform: translateX(100%);
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active {
2015-06-09 15:34:46 +08:00
transform: translateX(0);
transition: transform @effect-duration @easing-in-out;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-leave {
2015-06-09 15:34:46 +08:00
position: absolute;
transform: translateX(0);
top: 0;
right: 0;
left: 0;
bottom: 0;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-leave&-slide-horizontal-forward-leave-active {
2015-06-09 15:34:46 +08:00
transform: translateX(-100%);
transition: transform @effect-duration @easing-in-out;
}
2015-06-10 19:50:02 +08:00
}