Jumat, 11 Agustus 2017

Ionic - Padding

Ionic offers an easy way to add padding to elements. There are couple of classes that can be used and all of them will add 10px between border of element and its content. The following table displays all the available padding classes.

Padding Classes

Class NameClass Info
paddingAdds padding around every side.
padding-verticalAdds padding to the top and bottom.
padding-horizontalAdds padding to the left and right.
padding-topAdds padding to the top.
padding-rightAdds padding to the right.
padding-bottomAdds padding to the bottom.
padding-leftAdds padding to the left.

Using Padding

When you want to apply some padding to your element, you just need to assign one of the classes from the table above. The following example shows two block buttons. The first one is using the padding class and the second one does not. You will notice that the first button is larger, since it has 10pxpadding applied.
<div class = "button button-block padding">Padding</div>
<div class = "button button-block">No padding</div>
The above code will produce the following screen −
Ionic Padding

Tidak ada komentar:

Posting Komentar