text-overflow: ellipsis; //修剪文字,超过2行显示省略号 display: -webkit-box; -webkit-line-clamp: 2; //此处为上限行数 -webkit-box-orient: vertical; } 获取到文本离页面顶部的距离 let query = wx. createSelectorQuery() .in(this); query .select('.toll-station-name-en').boundingClientRect(...
在css里添加lines:1 如果不行,增加宽度100%或者固定宽度 实在不行,试试一下代码 width: 370rpx; lines: 1; text-overflow: ellipsis;
text-overflow text-overflow {string}:设置内容超长时的省略样式。 只支持text和ricthext lines lines {number}: 正整数,指定最大文本行数,默认lines值为0,表示不限制最大行数lines。如果文本不够长,实际展示行数会小于指定行数。 所以这样写即可: /*#ifdef APP-PLUS-NVUE*/.n-nowrap{ text-overflow: ellip...
text-overflow: ellipsis; white-space: nowrap; letter-spacing: 1px; } .content { margin-top: 60rpx; .title { font-size: 28rpx; font-weight: 700; color: #000000; } .desc { box-sizing: border-box; margin-top: 20rpx; font-size: 28rpx; color: #6A6A6A; max-height: 80vh; overflo...
text-overflow: ellipsis; white-space: nowrap; margin-left: 80rpx; } .origin_picker { font-size: 32rpx; font-family: Source Han Sans CN; font-weight: 400; line-height: 58rpx; color: #999999; opacity: 1; height: 64rpx; width: 270rpx; ...
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .extra { display: flex; font-size: 20rpx; } .tips { font-size: 22rpx; } .update { padding: 3rpx 10rpx 1rpx; color: rgba(255, 255, 255, 0.8); border: 1rpx solid rgba(255, 255, 255, 0.8); ...
{ width:200upx; margin-top:10upx; font-size:14upx; font-weight:bold; /*省略号*/ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .hot-scroll.poster.poster-wrapper.poster-score{ display:flex; } .hot-scroll.poster.poster-wrapper.poster-score.star{ width:20upx; height:20upx...
{font-size: 12px;padding: 13px 0;border-bottom: 1px solid #efefef;display: flex;align-items: center;justify-content: space-between;.goods-name {// 文字不允许换行(单行文本)white-space: nowrap;// 溢出部分隐藏overflow: hidden;// 文本溢出后,使用 ... 代替text-overflow: ellipsis;margin-right...
{font-size: 26rpx;display: flex;align-items: center;}.username {color: #999999;margin-left: 10rpx;width: 150rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.user {width: 50rpx;height: 50rpx;}.likenum {color: #333333;margin-left: 10rpx;}.like {width: 28rpx;height...
这个问题应该有很多成熟的插件可以实现,但是询问了同事,告知找了很多 uniapp 的插件都不能满足需求;目前项目对于这个功能是分 Android 和 IOS 做不同适配,Android 中使用 editor 渲染,而 IOS 中使用 textarea,然后将 emoji 转换为 [哭脸] 这样的方式去渲染,为什么 IOS 不用 editor 的原因没有去深究。 我也找...