mirror of
https://github.com/allankoechke/pywebview.git
synced 2026-12-03 01:17:44 +00:00
21 lines
356 B
Markdown
21 lines
356 B
Markdown
# CSS load
|
|
|
|
Change window background color by loading CSS
|
|
|
|
``` python
|
|
|
|
import webview
|
|
import threading
|
|
|
|
|
|
def load_css():
|
|
webview.load_css('body { background: red !important; }')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
t = threading.Thread(target=load_css)
|
|
t.start()
|
|
|
|
webview.create_window('Load CSS Example', 'https://pywebview.flowrl.com/hello')
|
|
|
|
``` |