簡體   English   中英

引導程序驗證錯誤消息CSS

[英]Bootstrap Validation Error Messages CSS

我正在將Bootstrap 3 Popover驗證與JQuery一起使用 我正在面對CSS的問題。 我的桌子上有文本框。 驗證工作正常,唯一的問題是無法在相應文本框上方顯示錯誤。

驗證圖片

上圖中的錯誤應指向我突出顯示的正確文本框,但這種情況不會發生。 我用於着色的CSS是:

CSS

.popover.error-popover {
    background-color: #F2DEDE;
    border-color: #EED3D7;
    box-shadow: none;
    color: #B94A48;
    cursor: pointer;
    max-width: none;
    z-index: 1099;
}
</style>

JS代碼是:

$('#myform').validate_popover({onsubmit: false, popoverPosition: 'top'});

HTML每個文本框的寬度為55。這是上表的結構。

<form id="myform">
<table>
<tr>
<td>
<input style="width:55px" name="code" />
</td>
<td>
<input style="width:55px" id="type" name="type"/>
</td>
.
.
.
</tr>
</table>
</form>

您還需要為箭頭設置css定義:

.popover.error-popover.top .arrow {
    border-top-color: #EED3D7;
    left: 30px;
}

在此Plunker中玩轉顏色(style.css)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM