Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
css: no se puede centrar verticalmente con el estilo de fuente "El tipo más afortunado"

Encuentro que no puedo centrar verticalmente el espacio con el estilo de fuente " Luckiest Guy ".
ingrese la descripción de la imagen aquí

Traté de aplicar display: flex;align-items: center; en el span pero no funciona.

aplicación.vue

 <template> <div id="app"> <span>Luckiest Guy Font</span> </div> </template> <script> export default { name: "App", }; </script> <style lang="scss"> @import url("https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap"); #app { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; color: #2c3e50; background-color: grey; margin-top: 60px; span { font-family: "Luckiest Guy", Helvetica, Arial, sans-serif; font-size: 19px; line-height: 19px; display: flex; align-items: center; } } </style>

Caja de arena de código:
https://codesandbox.io/s/cool-browser-lh9f8?file=/src/App.vue:441-453

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Su código no tiene problema y funciona bien. Tal vez tenga algunas otras clases que afecten a esta etiqueta.

También puede configurar vertical-align:baseline; en estilos de etiquetas de intervalo.

 .span-style{ display:flex; align-items:center; justify-content:center; border:1px solid black; height:40px; vertical-align:baseline; }
 <div> <span class="span-style"> Hello world </span> </div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!