![](/img/trans.png)
[英]why is <input type=“number” maxlength=“3”> not working in Safari?
[英]Vertical line appearing in input type=number on Mac version of Safari
我在Mac版的Safari中遇到了一個錯誤,在數字輸入字段中,我的框中出現了一條垂直線。 我已經在iphone以及基於Windows的瀏覽器上進行了檢查,並且它不存在於任何其他內容中。 編輯:Turnip指出它也發生在Windows上的Chrome中。 我今天早上檢查了它,當你在輸入框內單擊時會發生這種情況。
我用來生成html的代碼是:
<div class="quantity"> <input class="minus" type="button" value="-"> <input type="number" step="1" min="1" max="" name="quantity" value="1" title="Qty" class="input-text qty text no-spinners" size="4" pattern="[0-9]*" inputmode="numeric"> <input class="plus" type="button" value="+"> </div>
編輯:更新代碼塊以反映呈現的客戶端而不是服務器端代碼。
這是投入的微調。 你已經使用no-spinners
類設置了它的樣式,通過添加邊框和高度。 如果這是你的意圖,你可以按照這個來正確地隱藏它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.