const onTimeout = el => el.style.display = 'block';
document.querySelectorAll('.x').forEach((n, i) => {
setTimeout(onTimeout, i * 1000, n);
});
let index = -1;
const intervalId = setInterval(items => {
const el = items[++index];
if (el) {
el.style.display = 'block';
} else {
clearInterval(intervalId);
}
}, 1000, document.querySelectorAll('.x'));
(function next(items, index) {
if (items[index]) {
setTimeout(() => {
items[index].style.display = 'block';
next(items, index + 1);
}, 1000);
}
})(document.querySelectorAll('.x'), 0);
воздействовать на её цветесть css фильтры, которым без разницы как сохранена картинка.
filter: invert(100%)
body {
width:100%;
height:800px;
}
.box {
width:20%;
height:25%;
background-color:green;
position: relative;
}
.red {
width:100%;
height:50px;
background-color:red;
}
.blue {
width:100%;
height:30px;
background-color:blue;
position: absolute;
bottom: 0;
}
body {
width:100%;
height:800px;
}
.box {
width:20%;
height:25%;
background-color:green;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.red {
width:100%;
height:50px;
background-color:red;
}
.blue {
width:100%;
height:30px;
background-color:blue;
}
If the user agent is configured not to allow automatic or script-initiated playback of media, calling play() will cause the returned promise to be immediately rejected with a "NotAllowedError". Web sites should be prepared to handle this situation.
setTimeout(show(i), i * 300);
setTimeout(() => show(i), i * 300);
setTimeout(show.bind(null, i), i * 300);
setTimeout(show, i * 300, i);
function show(x) {
return function() {
// сюда помещаете то, что находится у вас в show сейчас
};
}
.about-box:nth-child(1) div