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

103
Views
Gradientes de CSS y -webkit-background-clip que no permiten una transición

 .nav-content a { color: #000; text-decoration: none; font-size: 1.1em; padding: 20px 40px 20px 40px; background-image: linear-gradient(90deg, #000, #000); -webkit-background-clip: text; font-family: 'Raleway', sans-serif; transition: .4s ease-in-out; } .nav-content a:hover { background-image: linear-gradient(90deg, #6E1D16, #E4DA1E, #D5347D, #15DAE7,#6E1D16, #E4DA1E, #D5347D, #15DAE7); -webkit-background-clip: text; color: rgba(0,0,0,.1); cursor: pointer; }
 <nav class="nav-content"> <a>Home</a> <a>Contact</a> <a>About</a> </nav>

Así que estoy tratando de hacer que mi "barra de navegación" haga una transición hacia afuera, pero solo hará una transición hacia adentro. Sé que las transiciones de degradado no son compatibles, pero ¿alguien sabe cómo hacerlo? Estoy bien con un trabajo alrededor también.

about 4 years ago · Santiago Gelvez
2 answers
Answer question

0

Los colores solo son visibles porque solo existen mientras se cierne sobre ellos. Simplemente mueva su fondo de degradado lineal a .nav-content a .

Además, especifica siempre qué propiedad animar ( color ) para evitar problemas de rendimiento.

 .nav-content a { color: #000; text-decoration: none; font-size: 1.1em; padding: 20px 40px 20px 40px; -webkit-background-clip: text; font-family: 'Raleway', sans-serif; transition: color .4s ease-in-out; background-image: linear-gradient(90deg, #6E1D16, #E4DA1E, #D5347D, #15DAE7,#6E1D16, #E4DA1E, #D5347D, #15DAE7); } .nav-content a:hover { -webkit-background-clip: text; color: rgba(0,0,0,.1); cursor: pointer; }
 <nav class="nav-content"> <a>Home</a> <a>Contact</a> <a>About</a> </nav>

about 4 years ago · Santiago Gelvez Report

0

Conozco este pequeño truco para animar gradientes, puedes hacerlos dos veces más grandes usando el tamaño background-size: 200% y establecer background-position: left top y la transición a background-position: right bottom

 .nav-content a { background-image: linear-gradient( 90deg, black 50%, /* ADDED THIS */ #6E1D16, #E4DA1E, #D5347D, #15DAE7, #6E1D16, #E4DA1E, #D5347D, #15DAE7 ); background-size: 200%; background-repeat: no-repeat; background-position: left top; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: #000; cursor: pointer; font: 1.1em 'Raleway', sans-serif; padding: 20px 40px 20px 40px; text-decoration: none; transition: background-position 1s cubic-bezier(0.645, 0.045, 0.355, 1.000); } .nav-content a:hover { background-position: right bottom }
 <nav class="nav-content"> <a>Home</a> <a>Contact</a> <a>About</a> </nav>

about 4 years ago · Santiago Gelvez 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!