居中对齐
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
</head>
<body>
<div>
<div class="center" >
<img style="width: 250px;" src="error_icon.png" />
</div>
<div class="center" style="text-align: center;height:50px;margin-top: 20px;" >
<div onclick="reload()" class="wrap center">加载失败,点击重新加载</div>
</div>
</div>
<style type="text/css">
.wrap{
width: 360px;
height: 50px;
color: #565656;
font-size: 20px;
border:1px solid #FEB0AC;
border-radius: 25px;
}
.center{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
body{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: relative;
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
}
</style>
<script type="text/javascript">
function reload(){
//alert("aa");
}
</script>
</body>
</html>