display: flex;
align-items: center;
justify-content: center;
<div class="1">
transition
, добавить анимацию: animation: show 10s;
.@keyframes show {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
const links = document.querySelectorAll('a');
// или
const links = document.getElementsByTagName('a');
const getHref = el => el.getAttribute('href');
// или
const getHref = el => el.attributes.href.value;
const hrefs = Array.from(links, getHref);
// или
const hrefs = Array.prototype.map.call(links, getHref);
// или
const hrefs = [];
for (const n of links) {
hrefs.push(getHref(n));
}
// или
const hrefs = [];
for (let i = 0; i < links.length; i++) {
hrefs[i] = getHref(links[i]);
}
<img src="images/1) header/shopping-cart-menu.png" id=cart_icon height="15" width="18"/>
<img src="images/1) header/magnifying-glass-menu.png" id=glass_icon" height="18" width="18"/>
id=cart_icon height="15"
$('ul').click(function(e) {
e.stopPropagation();
const $li = $(e.target).closest('li');
if ($li.length) {
$li.children('ul').toggle();
$li.siblings().children('ul').hide();
}
}).find('ul').hide();
getElementsByClassName() возвращает массивоподобный (итерируемый) объект всех дочерних элементов, соответствуюих всем из указанных имен классов.https://developer.mozilla.org/ru/docs/Web/API/Docu...