基于 cropper.js
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>裁剪图片</title>
<link href="https://cdn.bootcss.com/cropper/3.1.3/cropper.min.css" rel="stylesheet">
<style>
button{
outline: none;
border: none;
}
.center{
width: 1170px;
margin: auto;
}
.flex-wrap{
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.flex{
display: flex;
justify-content: center;
align-items: center;
}
.width100{
width: 100%;
}
.marginB20{
margin-bottom: 20px;
}
.borderR4{
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.boxShadow {
position: fixed;
width: 100%;
height: 100%;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 99999;
background: rgba(0, 0, 0, .7);
}
.boxShadow .center .boxShadow-tailoring {
background: linear-gradient(to right, #888888 0%, #000000 100%);
padding: 20px;
justify-content: space-between;
}
.boxShadow .center .boxShadow-tailoring .boxShadow-tailoring-title {
justify-content: space-between;
border-bottom: 1px solid;
/*border-image: linear-gradient(#276ace,#e92758) 30 30;*/
color: #ffffff;
padding-bottom: 20px;
}
.boxShadow .center .bo