Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
Why text pulse?

I wonder why this text, although it is the same, is pulsating. Any ideas? Looks like a font rendering issue.

setInterval(() => {
  const elem =  document.querySelector('p');
  
  elem.style.display = elem.style.display === 'none' ? '' : 'none';
}, 1000)
p {
  position: absolute;
  color: red;
}
<p>Test</p>
<p>Test</p>

about 4 years ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

The reason for this is that text normally is rendered anti-aliased, which means that you have pixels with different transparencies (and possibly also color) at the border of the font to get a smooth look:

enter image description here

The area around the font is therefore up to one pixel larger than it is perceived when you look at it. If you overlay the same text multiple times then it appears to be thicker because the pixels with transparencies overlay and thus reduce the amount of the background to be seen:

enter image description here

When no anti-aliasing (font smoothing) is active you don't see a difference between the reference text and the case where multiple elements overlay (that example might not work for every browser or os):

p {
  position: absolute;
}

* {
  font-smooth: never;
  -webkit-font-smoothing: none;
 }
<p>overlayed text</p>
<p>overlayed text</p>
<p>overlayed text</p>
<p>overlayed text</p>
<div>reference text</div>

With anti-aliasing (font smoothing) is active you can see that the overlayed text looks bolder then the reference text.

p {
  position: absolute;
}
<p>overlayed text</p>
<p>overlayed text</p>
<p>overlayed text</p>
<p>overlayed text</p>
<div>reference text</div>

about 4 years ago · Juan Pablo Isaza Denunciar

0

It most probably have to do with anti-aliasing of the font. It causes edges to be semi-transparent, which when overlapped will cause them to be more opaque and therefore more visible.

about 4 years ago · Juan Pablo Isaza Denunciar

0

Because the properties on the text changes, right click and inspect element and you will be able to see this:

enter image description here

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda