Bokeh Div Text Size

你离开我真会死。 提交于 2019-12-13 15:16:34

问题


How do I change the text size inside a single bokeh Div widget without changing the text size of other Divs in my app? (https://docs.bokeh.org/en/latest/docs/reference/models/widgets.markups.html)


回答1:


Div takes a style argument in which you can put a dictionary filled with normal html styling, eg:

some_div = Div(text="<b>A Title</b>", style={'font-size': '200%', 'color': 'blue'})



回答2:


In case of use of a bokeh server, you can also use css_classes = [] to add CSS class with definition in your css file

some_div = Div(text="<b>A Title</b>", css_classes=["my_div", "custom_css_class"])


来源:https://stackoverflow.com/questions/49988808/bokeh-div-text-size

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