afc163
9 years ago
5 changed files with 104 additions and 8 deletions
@ -0,0 +1,19 @@ |
|||
# 各种类型 |
|||
|
|||
四种颜色的标签。 |
|||
|
|||
- order: 1 |
|||
|
|||
--- |
|||
|
|||
````jsx |
|||
var Tag = antd.Tag; |
|||
|
|||
React.render(<div> |
|||
<Tag closable color="blue">蓝色</Tag> |
|||
<Tag closable color="green">绿色</Tag> |
|||
<Tag closable color="yellow">黄色</Tag> |
|||
<Tag closable color="red">红色</Tag> |
|||
</div>, document.getElementById('components-tag-demo-colorful')); |
|||
```` |
|||
|
@ -0,0 +1,72 @@ |
|||
@import "../mixins/index"; |
|||
@tagPrefixClass: ~"@{css-prefix}tag"; |
|||
|
|||
.@{tagPrefixClass} { |
|||
display: inline-block; |
|||
line-height: 22px; |
|||
height: 22px; |
|||
padding: 0 8px; |
|||
border-radius: 20px; |
|||
background: #f3f3f3; |
|||
font-size: @font-size-base; |
|||
margin-right: 4px; |
|||
margin-bottom: 8px; |
|||
transition: all 0.3s ease; |
|||
vertical-align: middle; |
|||
opacity: 0.85; |
|||
|
|||
&:hover { |
|||
opacity: 1; |
|||
} |
|||
|
|||
&, |
|||
a, |
|||
a:hover { |
|||
color: @text-color; |
|||
} |
|||
|
|||
.anticon-cross { |
|||
.iconfont-size-under-12px(7px); |
|||
cursor: pointer; |
|||
font-weight: bold; |
|||
margin-left: 3px; |
|||
position: relative; |
|||
top: -1px; |
|||
color: #6666; |
|||
transition: all 0.3s ease; |
|||
opacity: 0.66; |
|||
|
|||
&:hover { |
|||
opacity: 1; |
|||
} |
|||
} |
|||
|
|||
&-blue, |
|||
&-green, |
|||
&-yellow, |
|||
&-red { |
|||
&, |
|||
a, |
|||
a:hover, |
|||
.anticon-cross, |
|||
.anticon-cross:hover { |
|||
color: #fff; |
|||
} |
|||
} |
|||
|
|||
&-blue { |
|||
background: @primary-color; |
|||
} |
|||
|
|||
&-green { |
|||
background: @success-color; |
|||
} |
|||
|
|||
&-yellow { |
|||
background: @warning-color; |
|||
} |
|||
|
|||
&-red { |
|||
background: @error-color; |
|||
} |
|||
} |
Loading…
Reference in new issue