내 배경 크로스 페이딩이 AT ALL에서 작동하지 않는 문제가 있습니다. 어쩌면 누군가 내가 뭘 잘못했는지 말할 수 있을까요? :) 다음은 스크립트의 :CSS 배경 크로스 페이딩 문제
HTML :
<div class="bg">
<div class="backgroundchange">
<div class="bgimg" id="bg1">
<div class="title centerV">
<div>
<div class="text">
<h1>Malarstwo</h1>
<p>Beaty Domanskiej</p>
</div>
</div>
</div>
</div>
<div class="bgimg" id="bg2">
<div class="title centerV">
<div>
<div class="text">
<h1>Malarstwo</h1>
<p>Beaty Domanskiej</p>
</div>
</div>
</div>
</div>
<div class="bgimg" id="bg3">
<div class="title centerV">
<div>
<div class="text">
<h1>Malarstwo</h1>
<p>Beaty Domanskiej</p>
</div>
</div>
</div>
</div>
</div>
</div>
CSS : 결과
.bgimg {
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
position: absolute;
background-repeat: no-repeat;
background-position: center center;
transform: scale(1);
-webkit-box-shadow: inset 4px 1px 77px 40px rgba(0,0,0,0.78);
-moz-box-shadow: inset 4px 1px 77px 40px rgba(0,0,0,0.78);
box-shadow: inset 4px 1px 77px 40px rgba(0,0,0,0.78);
top: 0;
left: 0;
height: 100%;
width: 100%;
}
#bg1 {
background-image: url("../img/gallery/slonecz.jpg");
}
#bg2 {
background-image: url("../img/gallery/motyl.jpg");
}
#bg3 {
background-image: url("../img/gallery/slonecz.jpg");
}
@keyframes backgroundchangeFadeInOut {
0% {
opacity: 1;
}
17% {
opacity: 1;
}
25% {
opacity: 0;
}
92% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes backgroundchangeFadeInOut {
0% {
opacity: 1;
}
17% {
opacity: 1;
}
25% {
opacity: 0;
}
92% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#backgroundchange div:nth-of-type(1) {
animation-delay: 8s;
-webkit-animation-delay: 8s;
}
#backgroundchange div:nth-of-type(2) {
animation-delay: 6s;
-webkit-animation-delay: 6s;
}
#backgroundchange div:nth-of-type(3) {
animation-delay: 4s;
-webkit-animation-delay: 4s;
}
#backgroundchange div {
animation-name: backgroundchangeFadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 8s;
-webkit-animation-name: backgroundchangeFadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 8s;
}
, 내가 첫 번째 배경 세트를 볼 수 있지만, 그것은으로 크로스 페이드 결코 다음.
Banzay의 대답은 실제로 잘 작동하게! –
기능을 처리하기위한 JavaScript 로직 및 제어 흐름은 어디에 있습니까? HTML과 CSS만으로는 HTML5/CSS/JavaScript의 진정한 동적 가능성은 충분하지 않습니다. 내 미묘함이 충분히 명확하지 않은 경우 편집 : HTML/CSS 조합은 동적 인 HTML5 : 자바 스크립트를 만드는 세 번째 중요한 요소가 부족합니다! –
예루살렘, 나는 JS가 실제로이 목적을 위해 더 쉽게 만들어 준다는 것을 안다. 아직도 스타일이 더 많은 요소들에도 적용될 것이기 때문에 CSS에서 이것을해야한다. 귀하의 의견/답변 tho 주셔서 감사합니다! –