有没有办法格式化小部件的内容?

Is there a way to format the widgets' contents?

假设我想在 RadioButtonGroup 中的一个选项中的某个词下划线,这可能吗?

我尝试使用 Div class 作为输入,但没有成功。

谢谢

此 PR "Add support for specifying CSS classes on all LayoutDOM" 将于 2017 年 12 月进入 Bokeh 0.12.4 并提供一种机制来向任何 Bokeh CSS 类 添加任意 LayoutDOM模型(例如小部件),以便可以更轻松地设置样式。

它将像这样可用:

from bokeh.models import Div
div = Div(text="some text")

# add these CSS classes to the widget div 
div.css_classes = ["my-custom"]

然后您可以在模板或其他任何地方为 .my-custom 添加样式。