const elements = document.querySelectorAll('.x');
const delay = 1000;
const updateElement = el => el.style.display = 'block';
elements.forEach((n, i) => setTimeout(updateElement, i * delay, n));
let index = -1;
const intervalId = setInterval(() => {
const el = elements.item(++index);
if (el) {
updateElement(el);
} else {
clearInterval(intervalId);
}
}, delay);
(function next(index) {
if (index < elements.length) {
setTimeout(() => {
updateElement(elements[index]);
next(index + 1);
}, delay);
}
})(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