Я использую bootstrap popover для отображения данных, когда пользователь мыши над ссылкой/checkbox/data.twitter popover - применить другой класс css для разных popovers
Как добавить отдельный класс css в свой html для разных popovers, чтобы гарантировать, что определенные popovers будут правильно отображаться.
устанавливаемого сотовый класс, который я хочу добавить к моему HTML коду ниже также показан ниже, и называется popover_margin_left.
Вот мой HTML-код:
<span style="cursor: pointer;"
rel="popover"
data-content="{% trans 'The Test Details that should be included in your document is the data and information that you want displayed to all team members.' %} {% trans 'The Test Details that should be included in your document is the data and information that you want displayed to all team members.' %} {% trans 'The Test Details that should be included in your document is the data and information that you want displayed to all team members.' %}"
data-original-title="{% trans 'Test Details' %}"
data-placement="right">
<input type="checkbox" name="TestDetails" checked="checked" readonly="true" disabled="false" class="checkbox_resize" >
{% trans "Test Details" %}</span>
</input>
</span>
Вот мой CSS:
/* change default bootstrap popover width & z-index */
.popover {
direction: rtl;
min-width: 375px;
position: fixed;
word-break: normal;
word-wrap: break-word;
z-index: 9999; /* maintain a high z-index to bring the popover in the breadcrumbs forward */
background-color: khaki;
}
.popover_margin_left {
margin-left: -12px;
}
Я думаю, вы можете добавить 'class: popover_margin_right' в свой html. добавьте его в тег, где вы хотите добавить. –
Я пробовал это. Если вы не имеете в виду что-то другое - возможно, вы можете привести мне пример. – user1261774
Вы использовали '! Important' в своем CSS, например' .popover_margin_left {margin-left: -12px! Important; } ' –