【问题标题】:CSS | Background style - fixed not working in mobileCSS |背景样式 - 固定在移动设备中不起作用
【发布时间】:2019-07-12 05:37:24
【问题描述】:

网站:http://www.procolorchile.cl/

我需要将每张图片固定(在第一张之后)带有徽标

这是课程,但没有任何效果

.fullfondo {
  height: 100vh; 
  background-repeat: no-repeat; 
  background-attachment: fixed; 
  background-position: center;
}

【问题讨论】:

标签: css background-image fixed


【解决方案1】:

使用 css :nth-child(n+2)

.fullfondo:nth-child(n+2) {
  height: 100vh; 
  background-repeat: no-repeat; 
  background-attachment: fixed; 
  background-position: center;  
}

【讨论】:

  • 不工作 .fullfondo:nth-child(n+1) { height: 100vh;背景重复:不重复;背景附件:固定;背景位置:中心; } .fullfondo:nth-child(n+2) { 高度:100vh;背景重复:不重复;背景附件:固定;背景位置:中心; }
猜你喜欢
  • 1970-01-01
  • 2018-08-19
  • 2016-07-29
  • 1970-01-01
  • 2021-04-07
  • 1970-01-01
  • 2020-02-05
  • 2019-12-02
  • 1970-01-01
相关资源
最近更新 更多