当前位置:网站首页>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)
边栏推荐
- R language Visual facet chart, hypothesis test, multivariable grouping t-test, visual multivariable grouping faceting boxplot, and add significance levels and jitter points
- 什么是高内聚、低耦合?
- LeetCode - 面试题17.24 最大子矩阵
- Learning notes | data Xiaobai uses dataease to make a large data screen
- electron 添加 SQLite 数据库
- The Oracle message permission under the local Navicat connection liunx is insufficient
- How to write test cases for test coupons?
- Automated testing framework
- Electron adding SQLite database
- 在我有限的软件测试经历里,一段专职的自动化测试经验总结
猜你喜欢
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
Learning notes | data Xiaobai uses dataease to make a large data screen
Apprentissage comparatif non supervisé des caractéristiques visuelles par les assignations de groupes de contrôle
解决VSCode只能开两个标签页的问题
Talk about SOC startup (VII) uboot startup process III
The database synchronization tool dbsync adds support for mongodb and es
通过 Play Integrity API 的 nonce 字段提高应用安全性
Solve the problem that vscode can only open two tabs
Onedns helps college industry network security
Talk about SOC startup (IX) adding a new board to uboot
随机推荐
Complete collection of common error handling in MySQL installation
QT | multiple windows share a prompt box class
Use metersphere to keep your testing work efficient
In depth learning autumn recruitment interview questions collection (1)
[system design] index monitoring and alarm system
Programming examples of stm32f1 and stm32subeide -315m super regenerative wireless remote control module drive
对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
如何在博客中添加Aplayer音乐播放器
Solve the problem that vscode can only open two tabs
问下flinkcdc2.2.0的版本,支持并发,这个并发是指多并行度吗,现在发现,mysqlcdc全
STM32入门开发 采用IIC硬件时序读写AT24C08(EEPROM)
Le Cluster kubernets en cours d'exécution veut ajuster l'adresse du segment réseau du pod
Suggestions on one-stop development of testing life
How much do you know about excel formula?
R語言使用magick包的image_mosaic函數和image_flatten函數把多張圖片堆疊在一起形成堆疊組合圖像(Stack layers on top of each other)
简单介绍一下闭包及它的一些应用场景
《论文阅读》Neural Approaches to Conversational AI(1)
禁锢自己的因素,原来有这么多
技术分享 | 抓包分析 TCP 协议
Verilog design responder [with source code]