<div style="line-height:10px;text-align:center;border:2px solid #FFFFFF;padding:10px 10px;background: #FDF6F6;border-radius: 10px;">
<b>♥FREE Shipping Over $29♥
<p>♥30 Days Money-back Guarantee♥</b>
<div style="line-height:15px;text-align:center;border:2px solid #FFFFFF;padding:10px 10px;background: #FFEEEE;border-radius: 10px;">
<style>
  .coupon-code {
    display: block;
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    color: #000000;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
<p>.coupon-code .label {
font-family: &quot;Montserrat&quot;, sans-serif;
font-size: 12px;
color: #000000;
font-weight: bold;
letter-spacing: 1px;
}</p>
<p>.coupon-code .code {
display: flex;
justify-content: center;
margin-top: 5px;
font-family: &quot;Montserrat&quot;, sans-serif;
font-size: 20px;
font-weight: bold;
letter-spacing: 1px;
}</p>
<p>.coupon-code .code-item {
display: flex;
justify-content: center;
align-items: center;
margin: 0 10px;
background-color: #fff;
color: #FF6D6D;
padding: 8px 12px;
border-radius: 25px;
box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}</p>
<p>.coupon-extra {
text-align:center;
margin-bottom: 5px;
color: #000000;
font-family: &quot;Montserrat&quot;, sans-serif;
font-size: 12px;
letter-spacing: 1px;
font-weight: bold;
}</p>
<p>.coupon-extra span {
font-weight:bold;
color: #FF6D6D;
}
.countdown {
font-family: &quot;Montserrat&quot;, sans-serif;
font-size: 16px;
color: #000000;
letter-spacing: 1px;
margin-top: 10px;
text-align: center;
}
</style></p>
<div class="shipping-info">
  <p class="coupon-code">
    <span class="label">COUPON CODE:</span>
    <span class="code">
      <span class="code-item">SALE20</span>
      <span class="code-item">SALE30</span>
    </span> 
  </p>
  <p class="coupon-extra">Use <span> SALE20 </span>Over $110 - $20. </p>
  <p class="coupon-extra">Use <span>SALE30</span> Over $130 - $30. </p>
  <div class="countdown" id="countdown"></div>
</div>
</div>
</div>
<script>
  function countdown() {
    var endDate = new Date("2022-01-01 00:00:00"); // Set the end date and time for the countdown
<pre><code>var daysEl = document.getElementById(&quot;countdown&quot;);

setInterval(function() {
  var currentDate = new Date(); // Get the current date and time
  
  var totalSeconds = (endDate - currentDate) / 1000; // Calculate the total number of seconds remaining
  
  var days = Math.floor(totalSeconds / (3600 * 24)); // Calculate the number of days remaining
  
  var hours = Math.floor((totalSeconds % (3600 * 24)) / 3600); // Calculate the number of hours remaining
  
  var minutes = Math.floor((totalSeconds % 3600) / 60); // Calculate the number of minutes remaining
  
  var seconds = Math.floor(totalSeconds % 60); // Calculate the number of seconds remaining
  
  var countdownText = days + &quot; days &quot; + hours + &quot; hours &quot; + minutes + &quot; minutes &quot; + seconds + &quot; seconds&quot;; // Format the countdown text
  
  daysEl.innerHTML = countdownText; // Display the countdown text
  
}, 1000); // Update the countdown every second
</code></pre>
<p>}</p>
<p>countdown(); // Start the countdown
</script></p>

原文地址: https://www.cveoy.top/t/topic/qnGc 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录