#bottom-div { position: fixed; width: 100%; height: 100px; left: 0; bottom: -250px; background-color: #ffffFF; transition: bottom 300ms; z-index: 20; } #bottom-div.on { bottom: 0px; } .tishi{ width: 25%; height: 35%; background-color: #fc4d76; font-size: 0.5rem; margin: auto; margin-top: -0.6rem; text-align:center; }
<div id="bottom-div"> <div style="font-size: 0.4rem; text-align:center;margin-top: 0.4rem;">识别失败,没有检测到正面清晰的人脸</div> <div class="tishi"> <div style="margin-top: 1rem"> <a οnclick="shop_reDiagnosis()" style="color: #ffffFF">重新拍照</a></div> </div> </div> </div>