Is there a way to format the widgets' contents?

╄→гoц情女王★ 提交于 2019-11-29 15:42:55

This PR "Add support for specifying CSS classes on all LayoutDOM" will be going into Bokeh 0.12.4 in Dec 2017 and provided a mechanism to add arbitrary CSS classes to any Bokeh LayoutDOM model (e.g. widgets) so that they can be more easily styled.

It will be available like:

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

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

Then you can add styles for .my-custom in your template or whatever.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!