如图所示的样式
相关代码
Modal 内容。
css部分
.cu-modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1110;
opacity: 0;
outline: 0;
text-align: center;
-ms-transform: scale(1.185);
transform: scale(1.185);
backface-visibility: hidden;
perspective: 2000rpx;
background: rgba(0, 0, 0, 0.6);
transition: all 0.3s ease-in-out 0s;
pointer-events: none;
}
.cu-dialog {
position: relative;
display: inline-block;
vertical-align: middle;
margin-left: auto;
margin-right: auto;
width: 680rpx;
max-width: 100%;
background: #f8f8f8;
border-radius: 10rpx;
overflow: hidden;
}
我的效果
那个线实在是不会写,我用绝对定位写出来的效果在不同的手机分辨率下有时会失真,用相对定位的话两个元素总是占一行,而不能各占一行,不知道该怎么改了