ribbons.md 1.4 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 16 17 18 19 20 21 22 23
You can easily change the position of a ribbon by adding a class to the element.
<ul>
    <li><code>ribbon-top</code> - moves it to the top</li>
    <li><code>ribbon-right</code> - moves it to the right</li>
    <li><code>ribbon-bottom</code> - moves it to the bottom</li>
    <li><code>ribbon-left</code> - moves it to the lefg</li>
</ul>
You can also use multiple classes at once for example: <code><div class="ribbon ribbon-top ribbon-left"></div></code> moves the ribbon to the top left corner.

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

46 47 48 49 50
Change the style of a ribbon. Available styles:
<ul>
    <li><code>ribbon-bookmark</code> - creates a indentation on the left</li>
</ul>

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