头闻号

上海凡雨科贸有限公司

芳香烃|化工产品加工|木器涂料|其他助剂|工业用清洗剂|其他未分类

首页 > 新闻中心 > 科技常识:css教程之css设置字体颜色
科技常识:css教程之css设置字体颜色
发布时间:2023-02-01 09:54:44        浏览次数:2        返回列表

今天小编跟大家讲解下有关css教程之css设置字体颜色 ,相信小伙伴们对这个话题应该有所关注吧,小编也收集到了有关css教程之css设置字体颜色 的相关资料,希望小伙伴们看了有所帮助。

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>

来源:爱蒂网