好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

在div底部显示背景图片实现代码

下面代码实现div层背景图片在底部显示:

复制代码

代码如下:


div {
background:url(/images/bg. jpg ) no-re PE at fixed;
background-pos IT ion-y:bottom;
}


代码详解:

复制代码

代码如下:


div {
background -i mage:url(/images/bg.jpg);  /*设置div层的背景图片*/
background-repeat:no-repeat;  /*背景 图片不重复 显示*/
background-repeat:repeat;  /*背景图片横向及纵向重复*/
background-repeat:repeat-x;  /*背景图片横向重复*/
background-repeat:repeat-y;  /*背景图片纵向重复*/
background-attachment:fixed;  /*固定背景图片*/
background-attachment:scroll;  /*滚动背景图片*/
background-position-x:left;  /*背景图片在横向的最左方显示*/
background-position-x:right;  /*背景图片在横向的最右方显示*/
background-position-y:to p;   /*背景图片在纵向的最上方显示*/
background-position-y:bottom;  /*背景图片在纵向的最下方显示*/
}

总结

以上是 为你收集整理的 在div底部显示背景图片实现代码 全部内容,希望文章能够帮你解决 在div底部显示背景图片实现代码 所遇到的问题。

如果觉得 网站内容还不错, 推荐好友。

查看更多关于在div底部显示背景图片实现代码的详细内容...

  阅读:17次