font-style
Краткое описание свойства font-style
Устанавливает начертание шрифта. font-style - устанавливает начертание текста, обычное, курсивное или наклонное.
Синтаксис:
p {font-style:normal | italic | oblique;}
Описание аргументов:
normal - Обычное начертание текста.
italic - Курсив. Шрифт имитирующий рукописный.
oblique - Наклонный шрифт.
Значение по умолчанию
Нет. Обьектная модель:
[window.]document.getElementById("elementID").style.fontStyle Пример использования атрибута font-style: Листинг style.css:
span{font-style:normal;}
strong{font-style:oblique;}
Листинг index.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link type="text/css" rel="stylesheet" href="style.css" />
<title>Параметр font-style</title>
</head>
<body>
<span>Error</span> sit voluptatem <strong>assusantium</strong> doloremque
laudantium, totam rem aperiam eaque ipsa quae
ab illo inventore
</body>
</html>
Результат:
Error sit voluptatem assusantium doloremque laudantium, totam rem aperiam eaque ipsa quae ab illo inventore
Добавить комментарий