james1207
下面代码实现div层背景图片在底部显示:
div {
background : url (/images/bg.jpg) no-repeat fixed ;
background-position-y: bottom ;
}
代码详解:
div {
background-image : 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: top ; /*背景图片在纵向的最上方显示*/
background-position-y: bottom ; /*背景图片在纵向的最下方显示*/
}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-07-26
  • 2021-07-06
  • 2022-12-23
  • 2021-12-05
  • 2021-12-05
  • 2022-02-03
猜你喜欢
  • 2022-02-07
  • 2021-08-03
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案