ribbons.md 1.2 KB
Newer Older
C
ribbons  
chomik 已提交
1 2
---
title: Ribbons
C
chomik 已提交
3
menu: docs.ribbons
C
chomik 已提交
4
new: true
C
ribbons  
chomik 已提交
5 6
---

C
codecalm 已提交
7
### Default markup
C
ribbons  
chomik 已提交
8 9 10 11 12

{% example html columns=1 %}
{% include cards/ribbon.html %}
{% endexample %}

C
codecalm 已提交
13
### Ribbon position
C
ribbons  
chomik 已提交
14

15
You can easily change the position of a ribbon by adding a class to the element.
C
codecalm 已提交
16 17 18 19 20 21 22

    `ribbon-top` - moves it to the top
    `ribbon-right` - moves it to the right
    `ribbon-bottom` - moves it to the bottom
    `ribbon-left` - moves it to the lefg

You can also use multiple classes at once for example: `.ribbon.ribbon-top.ribbon-left` moves the ribbon to the top left corner.
23

C
ribbons  
chomik 已提交
24 25 26 27
{% example html columns=1 %}
{% include cards/ribbon.html top=true left=true %}
{% endexample %}

C
codecalm 已提交
28
### Ribbon color
C
ribbons  
chomik 已提交
29

30 31
Customize the ribbon's background color. You can click [here]({% docs_url colors %}) to see the list of available colors.

C
ribbons  
chomik 已提交
32 33 34 35
{% example html columns=1 %}
{% include cards/ribbon.html color="red" %}
{% endexample %}

C
codecalm 已提交
36
### Ribbon text
C
ribbons  
chomik 已提交
37

38 39
Set your own text in a ribbon.

C
ribbons  
chomik 已提交
40 41 42 43
{% example html columns=1 %}
{% include cards/ribbon.html color="green" text="-50%" %}
{% endexample %}

C
codecalm 已提交
44
### Ribbon style
C
ribbons  
chomik 已提交
45

C
codecalm 已提交
46
Change the style of a ribbon. 
47

C
ribbons  
chomik 已提交
48 49 50
{% example html columns=1 %}
{% include cards/ribbon.html bookmark=true color="orange" text="-50%" %}
{% endexample %}