header > div:not(:first-child) {
width: calc(100% - 36%);
padding: 68px 0 68px 48px;
border-left: 14px solid #fecb00;
background-color: #ebebeb;
}
h1, p {
margin: 0;
}
.hint
) пересекается с блоком А (основным текстом), и после, с использованием полученного и порогового (задаёте сами), можно решить, что делать с блоком.const clamp = (min, max, value) => Math.max(min, Math.min(max, value));
const calculateIntersection = (a, b) => {
const aRect = a.getBoundingClientRect();
const bRect = b.getBoundingClientRect();
const top = clamp(aRect.top, aRect.bottom, bRect.top);
const right = clamp(aRect.left, aRect.right, bRect.right);
const bottom = clamp(aRect.top, aRect.bottom, bRect.bottom);
const left = clamp(aRect.left, aRect.right, bRect.left);
const width = right - left;
const height = bottom - top;
const totalArea = bRect.width * bRect.height;
const intersectionArea = width * height;
const intersectionRatio = intersectionArea / totalArea;
return intersectionRatio;
};
@keyframes arrow {
0% {
width: 60px;
}
25% {
width: 260px;
transform: translateX(0px);
}
50%, 75% {
width: 60px;
transform: translateX(200px);
}
}
/
) указывает на директорию, которую «просматривает» сервер. Если же открыть HTML-файл в браузере, то /
будет указывать на корень диска, например в C:/
. h2 a {
text-decoration: none;
}
.item:nth-child(1) {
grid-column: 1 / span 6;
grid-row: 1 / span 10;
}
.item:nth-child(2) {
grid-column: 7 / span 6;
grid-row: 1 / span 6;
}
.item:nth-child(3) {
grid-column: 7 / span 6;
grid-row: 7 / span 4;
}
.item:nth-child(4) {
grid-column: 1 / -1;
}
min-height
; #
не нужно ставить в id
: href="#ID"
и id="ID"
, а Вы пишите href="#ID"
и id="#ID"
.