Is it possible to add bold and Italic in one line is css? -
currently saw can like:
body{ font-weight:bold; font-style:italic; }
is there way do...
body{ font: bold italic??? }
yes, via css shorthand font rule.
formal syntax: [ [ <‘font-style’> || || <‘font-weight’> || <‘font-stretch’> ]? <‘font-size’> [ / <‘line-height’> ]? <‘font-family’> ] | caption | icon | menu | message-box | small-caption | status-bar
see also: http://www.w3.org/tr/css2/fonts.html#font-shorthand
some examples:
p { font: 12px/14px sans-serif } p { font: 80% sans-serif } p { font: x-large/110% "new century schoolbook", serif } p { font: bold italic large palatino, serif } p { font: normal small-caps 120%/120% fantasy }
Comments
Post a Comment