代码
import ipywidgets as widgets
from IPython.display import HTML, display
slider = widgets.IntRangeSlider(
value=[0, 100],
min=0,
max=200,
step=1,
description='Range:',
orientation='horizontal',
readout=True
)
css_string = """
.ui-slider-range {
background: #ffff00 !important;
}
.widget-readout {
color: #00ffff !important;
}
"""
display(HTML("<style>{}</style>".format(css_string)))
display(slider)