<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS常用屬性</title>
<style type="text/css">
body{background-color: aquamarine;/*背景*/
/*背景 圖片*/
/*background-image:url(img/QQ圖片20190320163627.jpg);*/
/*背景repeat延水平或垂直兩個方向平鋪,repeat-x 只延水平方向平鋪 ,
* repeat-y只沿垂直方向平鋪 no-repeat 不重複平鋪只在圖像上出現一次*/
background-repeat: repeat-x;
/* 設置圖像起始位子,有兩個值,第一個值表示垂直方向,第二值表示水平方向
不足兩個值默認補center,也可以用兩個百分比表示或像素*/
background-position: top left;
/*背景是否固定或隨着頁面滾動,當一個網頁有上下滾動條時候當下滑時候圖片不會跟着下滑
故而設置該屬性可以讓圖片下滑 scroll 跟着一起下滑,fixed 圖像固定不動*/
background-attachment: scroll;
}
</style>
</head>
<body >
</body>
</html>