我想在结帐总金额上有一个零,因为在末端以零结尾的产品上,总金额显示为这样 £1.5
那么,如何更改它以像这样显示1.50英镑而不会弄乱其他产品呢?
任何代码片段都将不胜感激。
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<header class="main-header">
<nav class="main-nav nav">
</nav>
</header>
<div class="shop-items">
<div class="shop-item">
<span class="shop-item-title">Album 0</span>
<div class="shop-item-details">
<span class="shop-item-price">£12.50</span>
<button class="btn btn-primary shop-item-button" type="button">ADD TO BASKET</button>
</div>
<div class="shop-item">
<span class="shop-item-title">Album 2</span>
<div class="shop-item-details">
<span class="shop-item-price">£14.50</span>
<button class="btn btn-primary shop-item-button" type="button">ADD TO BASKET</button>
</div>
<div class="shop-item">
<span class="shop-item-title">Album 4</span>
<div class="shop-item-details">
<span class="shop-item-price">£19.50</span>
<button class="btn btn-primary shop-item-button" type="button">ADD TO BASKET</button>
</div>
</div>
</section>
<div class="shop-items">
<div class="shop-item">
<span class="shop-item-title">Album 6</span>
<div class="shop-item-details">
<span class="shop-item-price">£19.50</span>
<button class="btn btn-primary shop-item-button" type="button">ADD TO BASKET</button>
</div>
<div class="shop-items">
<div class="shop-item">
<span class="shop-item-title">Album 8</span>
<div class="shop-item-details">
<span class="shop-item-price">£19.50</span>
<button class="btn btn-primary shop-item-button" type="button">ADD TO BASKET</button>
</div>
慕森卡
相关分类