css背景的基本属性;
background-color: 属性;设置背景颜色;
background-image: url(img/bg.gif);设置背景图片;
background-repeat: no-repeat;将图片设置为不重复;
background-position:X Y;设置图片位置;
具体代码如下所示:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css背景</title>
<style type="text/css">
body{background-color: burlywood;background-image: url(img/bg.gif);
background-repeat: no-repeat;background-position:20px 30px;}
</style>
</head>
<body>
</body>
</html>
运行结果如下图所示:
css文本属性:
text-align:属性; 设置文字位置;
line-height: 属性; 设置文字行距;
text-indent: 属性; 设置文字首行缩进;
letter-spacing:normal; 设置字与字之间的距离;
direction: rtl; 设置文本的显示方向;
text-transform:uppercase; 设置英文的字母大小写样式;