我创建了一个模态弹出框。我希望在滚动时能固定背景体。我搜索了一下,并发现添加`background-attachment: fixed;`,但没有成功。
`background-attachment: fixed;`只适用于图片吗?如(w3schools.com/cssref/pr_background-attachment.asp)所述
`background-attachment: fixed;`只适用于图片吗?如(w3schools.com/cssref/pr_background-attachment.asp)所述
/* 将背景图像设置为固定的(不随页面滚动)*/
background-attachment: fixed;