ວິທະຍານມືສະແດງ CSS

ຄວາມວິດີຍາວມີຕົວແທນ

font-style ປະສົງນີ້ໃຊ້ເພື່ອກຳນົດຄວາມເວລາສັກສູບ.

ຄວາມປະສົງຂອງນີ້ສາມຄວາມທີ່ສາມາດກະກຽມໄດ້:

  • normal - ຄວາມເວລາທົ່ວໄປ
  • italic - ຄວາມເວລາສັກສູບ
  • oblique - ຄວາມເວລາຄ່ອງ (ຄວາມເວລາຄ່ອງ ແລະ ຄວາມເວລາສັກສູບຄືກັນຫຼາຍ ແຕ່ບໍ່ສະໜັບສະໜູນຫຼາຍ)

Example

p.normal {
  font-style: normal;
}
p.italic {
  font-style: italic;
}
p.oblique {
  font-style: oblique;
}

Try It Yourself

Font Weight

font-weight Property specifies the thickness of the font:

Example

p.normal {
  font-weight: normal;
}
p.thick {
  font-weight: bold;
}

Try It Yourself

Font Variant

font-variant Property specifies whether text is displayed in small-caps font (small uppercase letters).

In small-caps font, all lowercase letters are converted to uppercase. However, the font size of the uppercase letters after conversion is smaller than the font size of the original uppercase letters in the text.

Example

p.normal {
  font-variant: normal;
}
p.small {
  font-variant: small-caps;
}

Try It Yourself