当前位置:网站首页>Flet教程之 17 Card卡片组件 基础入门(教程含源码)
Flet教程之 17 Card卡片组件 基础入门(教程含源码)
2022-07-07 09:46:00 【知识大胖】
Flet是什么
Flet 是一个框架,使您能够轻松地以您喜欢的语言构建实时 Web、移动和桌面应用程序,并与您的团队安全地共享它们。无需前端经验。
什么是GridView
带有略微圆角和高程阴影的面板。
实战代码

import flet
from flet import Image, Page, GridView, border_radius
def main(page: Page):
page.title = "GridView Example"
page.theme_mode = "dark"
page.padding = 50
page.update()
images = GridView(
expand=1,
runs_count=5,
max_extent=150,
child_aspect_ratio=1.0,
spacing=5,
run_spacing=5,
)
page.add(images)
for i in range(0, 60):
images.controls.append(
Image(
src=f"https://picsum.photos/150/150?{i}",
fit="none",
repeat="noRepeat",
border_radius=border_radius.all(10),
)
)
page.update()
flet.app(target=main, view=flet.WEB_BROWSER)
边栏推荐
- 通过环境变量将 Pod 信息呈现给容器
- The post-90s resigned and started a business, saying they would kill cloud database
- Apprentissage comparatif non supervisé des caractéristiques visuelles par les assignations de groupes de contrôle
- Graduation season | keep company with youth and look forward to the future together!
- STM32入门开发 编写DS18B20温度传感器驱动(读取环境温度、支持级联)
- Talk about SOC startup (11) kernel initialization
- LeetCode - 面试题17.24 最大子矩阵
- 核舟记(一):当“男妈妈”走进现实,生物科技革命能解放女性吗?
- Nuclear boat (I): when "male mothers" come into reality, can the biotechnology revolution liberate women?
- There are ways to improve self-discipline and self-control
猜你喜欢
![Verilog design responder [with source code]](/img/91/6359a2f3fa0045b4a88956a475488c.png)
Verilog design responder [with source code]

聊聊SOC启动(七) uboot启动流程三

千人规模互联网公司研发效能成功之路

Poor math students who once dropped out of school won the fields award this year

Technology sharing | packet capturing analysis TCP protocol

Use metersphere to keep your testing work efficient

Talk about SOC startup (11) kernel initialization

About the application of writing shell script JSON in JMeter

Learning notes | data Xiaobai uses dataease to make a large data screen

核舟记(一):当“男妈妈”走进现实,生物科技革命能解放女性吗?
随机推荐
R语言可视化分面图、假设检验、多变量分组t检验、可视化多变量分组分面箱图(faceting boxplot)并添加显著性水平、添加抖动数据点(jitter points)
Android 面试知识点
《论文阅读》Neural Approaches to Conversational AI(1)
测试开发基础,教你做一个完整功能的Web平台之环境准备
解决VSCode只能开两个标签页的问题
一起探索云服务之云数据库
Talk about SOC startup (x) kernel startup pilot knowledge
Using ENSP to do MPLS pseudo wire test
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
R語言使用magick包的image_mosaic函數和image_flatten函數把多張圖片堆疊在一起形成堆疊組合圖像(Stack layers on top of each other)
Various uses of vim are very practical. I learned and summarized them in my work
Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]
关于在云服务器上(这里用腾讯云)安装mysql8.0并使本地可以远程连接的方法
Verilog design responder [with source code]
Neural approvals to conversational AI (1)
electron添加SQLite数据库
In depth learning autumn recruitment interview questions collection (1)
Unsupervised learning of visual features by contracting cluster assignments
STM32 entry development NEC infrared protocol decoding (ultra low cost wireless transmission scheme)
The database synchronization tool dbsync adds support for mongodb and es