一、cover-view里的文字无法垂直居中,用line-height或者用 display的align-items:center都不行
<view class="video">
<video class="myVideo" id="myVideo" :src="videoUrl" is-live autoplay :muted="true" :controls="false"
object-fit="fill" @error="videoErrorCallback"></video>
<cover-view class="stop">按此处急停</cover-view>
</view>
.video {
width: 58%;
margin: 0 1%;
height: 900rpx;
border: 1rpx solid #0096ff;
box-shadow: inset 0 0 30rpx 0 rgba(0, 150, 255, 0.5);
position: relative;
padding: 10rpx;
.myVideo {
width: 100%;
height: 100%;
z-index: 1;
position: relative;
}
.stop {
position: absolute;
z-index: 2;
width: 250rpx;
height: 250rpx;
color: #fff;
background-color: red;
border-radius: 50%;
font-size: 45rpx;
font-weight: bold;
right: 20rpx;
bottom: 20rpx;
text-align: center;
line-height: 250rpx;
}
}
二、另外想用webview看看调试情况,但是在webview里和真机调试不一样,webview里直接不显示。
3***@qq.com (作者)
app开发,在平板上真机调试出现的
2025-07-24 16:40