手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >css教程之css设置字体颜色
css教程之css设置字体颜色
摘要:font-size:18px;:设置字号color:#093:设置字色font-family:'宋体';:设置字体(要尽量使用通用的字体,就...

font-size:18px;:设置字号

color:#093:设置字色

font-family:'宋体';:设置字体

(要尽量使用通用的字体,就是用大家电脑上一般都有的字体,常用的是中文字体是宋体英文字体是arial)

设置字体的时候将英文字体设置在前,中文设置在后

如果想用比较特殊的字体,可以将其转换为图片

line-height:150%;:设置行与行之间的距离

font-weight:bold:设置字体的粗细(粗:bold 正常:normal)

font—style:设置字体样式(normal正常,italic斜体)

text-decoration:修饰文字(none正常,underline下划线,overline上划线,line-through删除线 blink闪烁(只支持IE6,7,搜狐))

letter-spacing:5px:字符间距(normal默认,length长度单位)

word-spacing:5px:单词间距(normal默认,length长度单位

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">

<html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>CSS字体控制</title>

<style type="text/css">

body{font-size:18px; color:#093; font-family:Arial, '汉仪行楷简'; line-height:300%; font-weight:bold}

div{width:400; height:50; background:#999; word-spacing:5em;}

h1{font-weight:normal;font-style:italic; text-decoration:underline; letter-spacing:5px; word-spacing:60px;}

</style>

</head></p> <p><body>

<h1>主持召开<span>院</span>会</h1>

<h2>设置行与行之间的距离</h2>

设置行与行之间的距离

<div>设置行与行之间的距离</div>

</body>

</html>

【css教程之css设置字体颜色】相关文章:

通过css加载远程字体示例代码

css如何设置层透明

CSS基础教程:CSS的color颜色

css教程:CSS文件应该保持整洁和统一

CSS教程:clip属性完全解答

CSS教程:CSS的Background Images背景图片

CSS基础教程:Class以及ID选择器

css设置body背景图片随内容增加多少

div+css必看的15个css重则

CSS教程:建议font-size使用em

精品推荐
分类导航