<div style='line-height:10px;text-align: justify;border: 2px solid #FFFFFF;padding: 10px 10px;background: #FDF6F6;border-radius: 10px;'>
  <div style='display: flex; justify-content: space-between;'>
    <b>♥FREE Shipping Over $29♥</b>
    <p>♥30 Days Money-back Guarantee♥</p>
  </div>
  <div style='line-height:15px;text-align: justify;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;
      }
<pre><code>  .coupon-code .label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #000000;
    font-weight: bold;
    letter-spacing: 1px;
  }
  
  .coupon-code .code {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
  }
  
  .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);
  }
  
  .coupon-extra {
    text-align:center;
    margin-bottom: 5px;
    color: #000000;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: bold;
  }
  
  .coupon-extra span {
    font-weight:bold;
    color: #FF6D6D;
  } 
&lt;/style&gt;
&lt;div class='shipping-info'&gt;
  &lt;p class='coupon-code'&gt;
    &lt;span class='label'&gt;COUPON CODE:&lt;/span&gt;
    &lt;span class='code'&gt;
      &lt;span class='code-item'&gt;SALE20&lt;/span&gt;
      &lt;span class='code-item'&gt;SALE30&lt;/span&gt;
    &lt;/span&gt; 
  &lt;/p&gt;
  &lt;p class='coupon-extra'&gt;Use &lt;span&gt; SALE20 &lt;/span&gt;Over $110 - $20. &lt;/p&gt;
  &lt;p class='coupon-extra'&gt;Use &lt;span&gt;SALE30&lt;/span&gt; Over $130 - $30. &lt;/p&gt;
&lt;/div&gt;
</code></pre>
  </div>
  <div style='text-align: center;'>
    <script>
      // Set the count down date
      var countDownDate = new Date().getTime() + (2 * 24 * 60 * 60 * 1000);
<pre><code>  // 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='countdown'
    document.getElementById('countdown').innerHTML = days + 'd ' + hours + 'h ' + minutes + 'm ' + seconds + 's ';

    // If the count down is finished, write some text
    if (distance &lt; 0) {
      clearInterval(x);
      document.getElementById('countdown').innerHTML = 'EXPIRED';
    }
  }, 1000);
&lt;/script&gt;
&lt;p id='countdown'&gt;&lt;/p&gt;
</code></pre>
  </div>
</div>

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

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