-
Anonymous
Элементы CSS Missearing при увеличении масштабирования
Сообщение
Anonymous »
Вот код < /h1>
html < /h2>
Код: Выделить всё
Elzero
< /code>
css < /h1>
* {
box-sizing: border-box;
}
div {
position: relative;
width: 600px;
height: 100px;
margin: 30px auto;
background-color: #eee;
font-size: 40px;
font-weight: bold;
letter-spacing: 10px;
text-align: center;
line-height: 80px;
border-top: 10px solid transparent;
border-left: 10px solid #f44336;
border-bottom: 10px solid transparent;
border-right: 10px solid #673ab7;
}
div::first-letter {
color: #f44336;
}
div::before,
div::after {
content: "";
position: absolute;
width: 600px;
height: 10px;
left: -10px;
background-image: linear-gradient(
to right,
#f44336 20%,
#2196f3 20%,
#2196f3 40%,
#4caf50 40%,
#4caf50 60%,
#e91e63 60%,
#e91e63 80%,
#6639b6 80%
);
}
div::before {
top: -10px;
}
div::after {
bottom: -10px;
}
Вот div при 100% Zoom
altos at 110% zoom
. Описание изображения здесь "src ="
https://i.sstatic.net/3gfvj1kl.png "/>
at 110%:
Подробнее здесь:
https://stackoverflow.com/questions/797 ... en-zooming
1753613687
Anonymous
Вот код < /h1>
html < /h2>
[code] Elzero
< /code>
css < /h1>
* {
box-sizing: border-box;
}
div {
position: relative;
width: 600px;
height: 100px;
margin: 30px auto;
background-color: #eee;
font-size: 40px;
font-weight: bold;
letter-spacing: 10px;
text-align: center;
line-height: 80px;
border-top: 10px solid transparent;
border-left: 10px solid #f44336;
border-bottom: 10px solid transparent;
border-right: 10px solid #673ab7;
}
div::first-letter {
color: #f44336;
}
div::before,
div::after {
content: "";
position: absolute;
width: 600px;
height: 10px;
left: -10px;
background-image: linear-gradient(
to right,
#f44336 20%,
#2196f3 20%,
#2196f3 40%,
#4caf50 40%,
#4caf50 60%,
#e91e63 60%,
#e91e63 80%,
#6639b6 80%
);
}
div::before {
top: -10px;
}
div::after {
bottom: -10px;
}
[/code]
Вот div при 100% Zoom
altos at 110% zoom
. Описание изображения здесь "src =" https://i.sstatic.net/3gfvj1kl.png "/>
at 110%:
Подробнее здесь: [url]https://stackoverflow.com/questions/79716344/css-elements-misalign-when-zooming[/url]