当前位置:网站首页>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语言使用magick包的image_mosaic函数和image_flatten函数把多张图片堆叠在一起形成堆叠组合图像(Stack layers on top of each other)
- 使用引用
- .NET MAUI 性能提升
- Excel公式知多少?
- [encapsulation of time format tool functions]
- La voie du succès de la R & D des entreprises Internet à l’échelle des milliers de personnes
- [system design] index monitoring and alarm system
- Neural approvals to conversational AI (1)
- sql里,我想设置外键,为什么出现这个问题
- Nuclear boat (I): when "male mothers" come into reality, can the biotechnology revolution liberate women?
猜你喜欢

RationalDMIS2022 高级编程宏程序

Test the foundation of development, and teach you to prepare for a fully functional web platform environment

Web端自动化测试失败的原因

The database synchronization tool dbsync adds support for mongodb and es

基于华为云IOT设计智能称重系统(STM32)

Distributed database master-slave configuration (MySQL)

Using ENSP to do MPLS pseudo wire test

自动化测试框架

Stm32f1 and stm32subeide programming example -max7219 drives 8-bit 7-segment nixie tube (based on SPI)

Solve the problem that vscode can only open two tabs
随机推荐
How much do you know about excel formula?
聊聊SOC启动(十一) 内核初始化
Various uses of vim are very practical. I learned and summarized them in my work
自动化测试框架
问下flinkcdc2.2.0的版本,支持并发,这个并发是指多并行度吗,现在发现,mysqlcdc全
What development models did you know during the interview? Just read this one
Distributed database master-slave configuration (MySQL)
基于华为云IOT设计智能称重系统(STM32)
What is cloud computing?
关于测试人生的一站式发展建议
Technology sharing | packet capturing analysis TCP protocol
What is high cohesion and low coupling?
STM32入门开发 编写DS18B20温度传感器驱动(读取环境温度、支持级联)
Two week selection of tdengine community issues | phase II
STM32入门开发 采用IIC硬件时序读写AT24C08(EEPROM)
In my limited software testing experience, a full-time summary of automation testing experience
Briefly introduce closures and some application scenarios
Verilog design responder [with source code]
STM32入门开发 NEC红外线协议解码(超低成本无线传输方案)
對比學習之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments