0
使用此代碼,我生成一個CSS/HTML Receipt。但我有問題,長productnames產品上的CSS收據wordwrap
.boxReceipt {
width:300px;
}
ul {
list-style: none;
}
.receiptList > li {
padding: 0 2px;
position: relative;
}
.receiptList > li:not(:first-child) {
border-top: 1px solid rgba(136, 136, 136, 1);
margin-top: 5px;
padding-top: 5px;
}
.receiptList > li > .receiptPrice {
font-weight: bold;
position: absolute;
right: 2px;
text-align: right;
}
<div class="boxReceipt">
<ul class="receiptList">
<li>
<span class="receiptName">Product 1</span>
<span class="receiptPrice">USD 124.90</span>
</li>
<li>
<span class="receiptName">Veryver very very very long product 2</span>
<span class="receiptPrice">USD 124.90</span>
</li>
<li>
<span class="receiptName">Product 3</span>
<span class="receiptPrice">USD 124.90</span>
</li>
</ul>
</div>
在很長desription我需要將wordWrap。我怎樣才能使它與固定寬度? 在這一刻,prouct名是在價格
很好,謝謝你 – SandraC