uniapp的样式 *** 作

uniapp的样式 *** 作,第1张

style="font-size:28upx"  这是uniapp里的字体样式

style="width:225upxwhite-space: nowrapoverflow: hiddentext-overflow: ellipsis">//限制显示次数

<view class="homestay-list" v-for="(item3,index) in hotellist" :id="item3.id">

<image :src=item3.hotelimage></image>

<view class="homestay-text">

<view>

<text class="homestay-money">tel:<strong style="font-size:28upx">{{item3.hotelphone}}</strong></text>

<text class="homestay-membermoney">{{item3.cityname}}<strong></strong></text>

</view>

<view class="homestay-between">

<text class="homestay-people" style="width:225upxwhite-space: nowrapoverflow: hiddentext-overflow: ellipsis">{{item3.hoteltag}}</text>

<view>

<image src="/static/img/x.png"></image>

<text class="homestay-start">{{item3.star_type}}.0</text>

</view>

</view>

<view>

<text class="homestay-txt">{{item3.hotelname}}</text>

</view>

</view>

</view>  //一个循环遍历的显示的典型例子

(1) 动态class样式

(2) 图片动态资源 :src

eg1:后台返回图片的相对路径,需拼接完整的网络地址

eg2:动态图片资源和动态class样式


欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/bake/7879090.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-11
下一篇2023-04-11

发表评论

登录后才能评论

评论列表(0条)

    保存