结构
<View className='root'>
<View className='Error-404'>ERROR 404</View>
</View>
样式
.root {
background: #5e8198;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: whitesmoke;
.Error-404 {
font-size: 50px;
text-align: center;
width: 5em;
height: 5em;
position: relative;
&::before,
&::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
top: -30spx;
left: 0;
transform: rotate(45deg);
border-radius: 15px;
box-shadow: 0.3em 0.3em 0.3em hsla(0, 0%, 35%, 0.8);
}
}
}
样式展示: