Html 修复了使用淡入动画时背景附件不工作的问题?
我正在为我的网站使用淡入动画,我尝试在css中实现Html 修复了使用淡入动画时背景附件不工作的问题?,html,css,Html,Css,我正在为我的网站使用淡入动画,我尝试在css中实现后台附件:fixed属性,但是它对我来说没有任何改变。我有一种感觉,这与我的动画淡入有关,但我真的不确定。以下是我的容器类和主体: body { animation: fadeInAnimation ease 3s; animation-iteration-count: 1; animation-fill-mode: forwards; background-image: url(images/backgr
后台附件:fixed
属性,但是它对我来说没有任何改变。我有一种感觉,这与我的动画淡入有关,但我真的不确定。以下是我的容器类和主体:
body {
animation: fadeInAnimation ease 3s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
background-image: url(images/background.png);
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
.container{
height: 100vh;
width: 100%;
padding-left: 5%;
padding-right: 5%;
box-sizing: border-box;
}
html {
background-color: black;
}
请通过代码段函数创建一个。