[
收藏此章节]
[投诉]
文章收藏
§背景篇§
背景图片
格式:
<style>body{background:url(图片地址)}</style> 示例:<style>body{background:url(http://tuke.52pk.net/data/2007/03/09/0643441.jpg)}</style>
效果:
见文案 之前的代码<body background=图片地址>已失效,大家现在改用上面的吧。--3月5日 背景图片相对固定
固定、无重复简化代码:<style>body{background:fixed url(图片地址) 背景颜色 no-repeat 位置}</style>
固定背景:<style>body{background:fixed url(图片地址)}</style>
本章代码:<style>body{background:fixed url(http://tuke.52pk.net/data/2007/07/31/0321551.jpg) #ff99ff no-repeat left bottom}</style>
background-color:颜色,即图片无显示、未及显示时的背景颜色或填充 默认(白色)
background-attachment:fixed 固定:就是 鼠标往下拉 但是背景却保持不变(默认不固定)
background-repeat: repeat-x 重复:-x横向 -y纵向 -x-y全向(默认) :no-repeat 不重复
background-position: left 位置:左 right 右 top 上 bottom下 center中 默认left top
还有一种相对位置 background-position: 数值% 数值% 自己可以试试
插入书签