当前位置:网站首页>Flet tutorial 12 stack overlapping to build a basic introduction to graphic and text mixing (tutorial includes source code)

Flet tutorial 12 stack overlapping to build a basic introduction to graphic and text mixing (tutorial includes source code)

2022-07-05 16:36:00 Knowledge fatness

Flet What is it?

Flet It's a framework , Make it easy for you to build real-time in your favorite language Web、 Mobile and desktop applications , And share them safely with your team . No front-end experience .

What is? Stack

Controls that place their children above each other . If you want to overlap multiple children in a simple way , For example, there are some text and images , Overlay with gradients and buttons attached to the bottom , This control is useful .

Combat code

image.png

import flet
from flet import Image, Page, Row, Stack, Text

def main(page: Page):
    st = Stack(
        [
            Image(
                src=f"https://picsum.photos/300/300",
                width=300,
                height=300,
                fit="contain",
            ),
            Row(
                [
                    Text(
                        "Image title",
                        color="white",
                        size=40,
                        weight="bold",
                   
原网站

版权声明
本文为[Knowledge fatness]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207051547084691.html