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

358
Views
El peso de la fuente en el texto HTML interno en Laravel solo funciona si está configurado en color blanco

Implementé una cuenta regresiva en mi aplicación Laravel 5 y deseo cambiar el peso de la fuente de su texto. Por alguna razón, esta simple tarea me está tomando mucho tiempo para resolver. Si el color se establece en #fff, el peso de la fuente se aplica correctamente. Si cambio el color, el peso de la fuente deja de funcionar.

Imágenes para comparar: ingrese la descripción de la imagen aquí ingrese la descripción de la imagen aquí

archivo blade.php

 <a style="color: #fff" href=""> <div id="countdown-component" style="display:inline;color:#EC1B33;font-weight:600;letter-spacing:2px;"> </div> </a>

Función JS para generar la cuenta regresiva:

 <script> // Set the date we're counting down to var countDownDate = new Date("Feb 15, 2022 12:00:00").getTime(); // Update the count down every 1 second var x = setInterval(function() { // Get today's date and time var now = new Date().getTime(); // Find the distance between now and the count down date var distance = countDownDate - now; // Time calculations for days, hours, minutes and seconds var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); // Display the result in the element with id="demo" document.getElementById("countdown-component").innerHTML = days + " DAYS " + hours + " HOURS " + minutes + " MINUTES " + seconds + " SECONDS "; // If the count down is finished, write some text if (distance < 0) { clearInterval(x); document.getElementById("countdown-component").innerHTML = "EXPIRED"; } }, 1000); </script>

Gracias por adelantado.

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

0

 // Set the date we're counting down to var countDownDate = new Date("Feb 15, 2022 12:00:00").getTime(); // Update the count down every 1 second var x = setInterval(function () { // Get today's date and time var now = new Date().getTime(); // Find the distance between now and the count down date var distance = countDownDate - now; // Time calculations for days, hours, minutes and seconds var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var hours = Math.floor( (distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) ); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); // Display the result in the element with id="demo" document.getElementById("countdown-component").innerHTML = days + " DAYS " + hours + " HOURS " + minutes + " MINUTES " + seconds + " SECONDS "; // If the count down is finished, write some text if (distance < 0) { clearInterval(x); document.getElementById("countdown-component").innerHTML = "EXPIRED"; } }, 1000);
 <a style="color: #fff" href=""> <div id="countdown-component" style=" display: inline; color: #fff; font-weight: 400; letter-spacing: 2px; " ></div> </a>
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!