问题
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