我正在使用背景区域示例。我有几个问题
- 在方法描述下的文档
addCustomTime
中,提到了将 id 添加为类名,但对该类的任何更改都没有生效。 - 如何将
content
背景区域中的文本与具有边框的背景区域居中对齐? - 另外如何更改
setCurrentTime(time)
标记的css?
我的 CSS
.vis-current-time {
color: black !important;
border: 2px;
cursor: hand;
}
.milestone-1 {
color: green !important;
border: 2px;
cursor: hand;
}
.vis-item.vis-background.positive {
background-color: rgba(0, 0, 200, 0.2);
cursor: hand;
}
.vis-item.vis-background.negative {
background-color: rgba(255, 0, 0, 0.2);
cursor: hand;
}
.vis-item-overflow.vis-item-content {
left: auto !important;
text-align: center !important;
color: #ff0000 !important;
}
这是我的问题的plunker 链接。
更新
我能够将content
文本居中对齐。我也更新了我的 plunker,但边界没有生效
#visualization .vis-item.vis-background.positive .vis-item-content {
width: 100%;
text-align: center !important;
border: 2px;
}
#visualization .vis-item.vis-background.negative .vis-item-content {
width: 100%;
text-align: center !important;
}