...
devServer: {
overlay: true,
open: true
}
...
...
"scripts": {
"dev": "webpack serve",
...
}
...
productMenuItems[0].append(newButtonDown)
var colorsBig = document.querySelector('.big-color');
var colorsElements = document.querySelectorAll('ul li');
for(var colorElement of colorsElements) {
colorElement.onmouseenter = function(event) {
colorsBig.classList.remove('hidden');
var targetX = event.target;
var location = targetX.getBoundingClientRect().x;
colorsBig.style.left = location + 'px'
}
colorElement.onmouseleave = function() {
colorsBig.classList.add('hidden');
}
}
:nth-child()
- это цикл.:nth-child(n+9)
:nth-child(-n+4)
выберется с 1 по 4 элементы. :nth-child(n+3):nth-child(-n+8)
с 3 по 8.