成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

Flex實(shí)現(xiàn)表格布局(微信小程序)

2022-11-14    分類: 微信小程序

網(wǎng)站建設(shè) - 建站教程 - 微信小程序 - Flex 實(shí)現(xiàn)表格布局 (微信小程序

微信小程序自己開發(fā)了一套 wxml + wxss,對許多 HTML 標(biāo)簽和 CSS 屬性不支持。

不支持 table 標(biāo)簽,推薦使用 flex 布局。

自然而然的想法:flex 嵌套,效果還不錯(cuò),貼代碼如下:

<view id="panel" class="flex-column">

<view class="flex-cell flex-row">

<text class="flex-cell flex-row">1</text>

<text class="flex-cell flex-row">2</text>

<text class="flex-cell flex-row">3</text>

<text class="flex-cell flex-row">4</text>

</view>

<view class="flex-row flex-cell">

<text class="flex-cell flex-row">1</text>

<text class="flex-cell flex-row">2</text>

<text class="flex-cell flex-row">3</text>

<text class="flex-cell flex-row">4</text>

</view>

<view class="flex-row flex-cell">

<text class="flex-cell flex-row">1</text>

<text class="flex-cell flex-row">2</text>

<text class="flex-cell flex-row">3</text>

<text class="flex-cell flex-row">4</text>

</view>

<view class="flex-row flex-cell">

<text class="flex-cell flex-row">1</text>

<text class="flex-cell flex-row">2</text>

<text class="flex-cell flex-row">3</text>

<text class="flex-cell flex-row">4</text>

</view>

<view class="flex-row flex-cell">

<text class="flex-cell flex-row">1</text>

<text class="flex-cell flex-row">2</text>

<text class="flex-cell flex-row">3</text>

<text class="flex-cell flex-row">4</text>

</view>

</view>

#panel{

height:65vh;

background:#fff;

}

#panel text{

line-height: 13vh;

border-right: 1rpx solid #ddd;

border-bottom: 1rpx solid #ddd;

}

.flex-row{

display: flex;

flex-direction: row;

justify-content: center;

align-items: center;

}

.flex-column{

display: flex;

flex-direction: column;

justify-content: center;

align-items: stretch;

}

.flex-cell{

flex: 1;

}

網(wǎng)頁標(biāo)題:Flex實(shí)現(xiàn)表格布局(微信小程序)
當(dāng)前地址:http://jinyejixie.com/news38/213388.html

網(wǎng)站建設(shè)、網(wǎng)絡(luò)推廣公司-創(chuàng)新互聯(lián),是專注品牌與效果的網(wǎng)站制作,網(wǎng)絡(luò)營銷seo公司;服務(wù)項(xiàng)目有微信小程序

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

搜索引擎優(yōu)化
榆中县| 岳西县| 唐海县| 仁寿县| 威海市| 抚州市| 象山县| 齐河县| 常熟市| 东乌| 永济市| 五原县| 彭水| 郯城县| 渑池县| 吐鲁番市| 大关县| 金门县| 琼结县| 福建省| 隆子县| 淮安市| 天峨县| 晴隆县| 容城县| 云林县| 巍山| 河津市| 贡山| 静乐县| 延庆县| 容城县| 郯城县| 深州市| 贡山| 浪卡子县| 岫岩| 株洲县| 宝清县| 天气| 柳江县|