<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>無標題文檔</title>
<style>
.divCen{
width:200px; height:100px;
margin:90px auto; /*div居中*/
background-color:#333333;
color:#FFFFFF;
line-height : 30px;
}
.divIn{
border-bottom : dotted 1px #FFFFFF;
margin-left:4px;
}
</style>
</head>
<body>
<div class="divCen" >
<div class="divIn" id="box">秒圍墾唐1</div>
<div class="divIn" id="box">秒圍墾2唐</div>
<div class="divIn" id="box">秒圍墾唐3</div>
</div>
</body>
</html>
background與font 總結:
1 、background
background-attachment:fixed; 背景是否滾動
background-color:gray; 背景顏色
background-image:url(bg.jpg); 背景圖
background-repeat:no-repeat; 背景圖是否重複
background-position:center 0px; 背景圖位置
2、font
font-size 文字大小(一般均爲偶數)
font-family 字體(中文默認宋體)
color 文字顏色(英文、rgb、十六位進制色彩值)
line-height 行高
text-align 文本對齊方式
text-indent 首行縮進(em縮進字符)
font-weight 文字着重
font-style 文字傾斜
letter-spacing 字母間距
word-spacing 單詞間距(以空格爲解析單位)