举例:
如果您要加载富文本框内容的DOM id是detail
那么就这么写scss样式
#detail {
font-size: 14px;
text-align: center;
&>>>p {
font-size: 14px;
text-align: justify;
line-height: 26px;
color: #666;
margin-bottom: 20px;
&:last-of-type {
margin-bottom: 0;
}
}
&>>>img {
margin-bottom: 20px;
}
}
注意“>>>”这个很关键,是用来延迟渲染样式的,其原理就是等待富文本内容、图片全部加载完了在渲染样式