CSS
CSS
%%html
<style>
.button_style{
width:100%;
border : 2px solid silver;
height: 50px;
background-color:red;
color: blue;
font-size: 24px;
font-weight: bold;
}
</style>
button = widgets.Button(description='Click')
button.add_class('button_style')
display(button)
Layout
from ipywidgets import Layout
button = widgets.Button(description='Click', layout={'width':'50%', 'height':'80px'})
display(button)
from ipywidgets import Layout
button_layout=Layout(width='50%', height='80px')
button = widgets.Button(description='Click', layout=button_layout)
display(button)
Pre-defined Style
button = widgets.Button(description='Click', button_style = 'info')
display(button)
Style
button = widgets.Button(description='Click')
button.style.button_color = 'silver'
display(button)