极乐门资源网 Design By www.ioogu.com
微信小程序 flex实现导航实例详解
实现示意:
1.链接顶部内边距,留出圆形图标的位置。
2.伪元素:before绘制圆形。
3.圆形中添加图标。
4.左右外边距控制间距,及促使在需要的地方换行。
wxml:
<view class="serviceMenu"> <navigator url="http://xwbline.com/">资本</navigator> …… </view>
wxss:
.serviceMenu{ display:flex;"\20"; position:absolute; top:0; left:50%; margin-left:-55rpx; width:110rpx; height:110rpx; border-radius:50%; background:#bbc1cd; } //设定不同图标。注意链接地址是绝对地址,因为小程序不支持相对地址的背景图。只支持image相对地址。 .serviceMenu navigator:nth-child(1):before{ background:#fc6e51 url(http://xwbline.com/icon_service_big01.png) no-repeat center center; } .serviceMenu navigator:nth-child(2):before{ background:#48cfad url(http://xwbline.com/icon_service_big02.png) no-repeat center center; } ………………
如果需要字数限制的话:
text{ display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
极乐门资源网 Design By www.ioogu.com
极乐门资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
极乐门资源网 Design By www.ioogu.com
暂无微信小程序 flex实现导航实例详解的评论...
更新日志
2024年09月23日
2024年09月23日
- 国风大师纯音系列《古筝仙子 常静演奏 十指弹一》1CD[FLAC][919MB]
- DasKapital-OneMustHaveChaosInsidetoGiveBirthtoaDancingStar(2024)[24-44.1]WAV
- 王菲.1999-《只爱陌生人》日本东芝版[低速原抓WAV+CUE]
- 张小英1987-金奖金曲第一集[新加坡版][WAV+CUE]
- 鹿晗.2015-重启【海蝶】【FLAC分轨】
- 张芸京.2012-小女孩【金牌大风】【WAV+CUE】
- 余天.2002-雄狮魅力金曲2CD(南方金点系列)【南方】【WAV+CUE】
- 银霞.1982-《结·SAYYESMYBOY》台湾复刻版[WAV+CUE]
- 梁汉文1993-火热动感[引进版][WAV+CUE]
- 梁汉文2008-EDMONDHITS48[香港]3CD[WAV+CUE]
- 国风大师纯音系列《童丽-[渭城曲]》1CD[WAV分轨][593.5MB]
- 国风大师纯音系列《许菱子《烧筝2》古筝曲集》1CD[WAV分轨][1.3GB]
- 王子异《1996 Part.2》[320K/MP3][18.29MB]
- 群星.1994-宝丽金最倾情3CD【宝丽金】【WAV+CUE】
- 乐俊亨.2024-同泪【CharioticMusic】【FLAC分轨】