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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -