一、字体与颜色
font
1.font-family //字体类型
//字体名称:宋体,楷体,黑体
2.font-size //字体大小
//30px
3.font-style //字体样式
//normal | italic
4.font-weight //字体粗细
//bold
<style >
*{
font-family: 微软雅黑;
font-size: 20px;
font-style: italic;
font-weight: bold;
}
</style>
二、背景属性
1.background-color
2.background-image
3.background-repeat
4.background-attachment(适用于body)
5.background-position
下面是选择position的四种方法:
1.水平:left center right,垂直:top center bottom
2.50px 50px
3.-50px -50px
4.50% 50%
<!DOCTYPE html>
<html>
<head>
<title></title>
<style >
div{
width: 1200px;
height: 400px;
background-color: #c0c;
background-image: url('a.jpg');
background-repeat: no-repeat;
background-position: 50% 50%;
/* 以上四行可以缩写为:
background: #c0c url('a.jpg') no-repeat fixed 50% 50%; */
}
</style>
</head>
<body>
<h1>linux technology</h1>
<div>
<p>linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!linux is useful very much!</p>
</div>
</body>
</html>
三、文本属性
1.letter-spacing //字间距
2.word-spacing //词间距
3.text-decoration // 划线
//none || underline下划线 || overline上划线 || line-through 删除线
//none用来把a标签的下划线取掉
<!DOCTYPE html>
<html>
<head>
<title></title>
<s