123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- $clipper-edge-border-width: 6rpx !default;
- .t-cropper {
- position: fixed;
- width: 100%;
- height: 100%;
- top: 0;
- bottom: 0;
- z-index: 1000;
- overflow: hidden;
- .canvas {
- position: absolute;
- top: 5000px;
- left: 5000px;
- }
- // 裁剪区域
- .t-preview-container {
- position: fixed;
- width: 100%;
- height: 100%;
- top: 0;
- bottom: 0;
- z-index: 1000;
- opacity: 0;
- overflow: hidden;
- .preview-body {
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- background: #000;
- overflow: hidden;
- .mask-model {
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- background: #000;
- opacity: 0.4;
- pointer-events: none;
- }
- .image-wrap {
- position: absolute;
- .image {
- position: absolute;
- }
- }
- // 裁剪框盒子
- .frame-box {
- position: absolute;
- left: 100px;
- top: 100px;
- width: 200px;
- height: 200px;
- // 矩形图片
- .rect {
- position: absolute;
- left: -2px;
- top: -2px;
- width: 100%;
- height: 100%;
- border: 2rpx solid white;
- overflow: hidden;
- box-sizing: content-box;
- .image-rect {
- position: absolute;
- .rect-img {
- position: absolute;
- }
- }
- }
- //裁剪框线条
- .line-one {
- position: absolute;
- width: 100%;
- border-top: 1px dashed #ccc;
- left: 0;
- top: 33.3%;
- box-sizing: content-box;
- }
- .line-two {
- position: absolute;
- width: 100%;
- border-top: 1px dashed #ccc;
- left: 0;
- top: 66.7%;
- box-sizing: content-box;
- }
- .line-three {
- position: absolute;
- height: 100%;
- border-right: 1px dashed #ccc;
- top: 0;
- left: 33.3%;
- box-sizing: content-box;
- }
- .line-four {
- position: absolute;
- height: 100%;
- border-right: 1px dashed #ccc;
- top: 0;
- left: 66.7%;
- box-sizing: content-box;
- }
- .frame-left-top {
- position: absolute;
- width: 20px;
- height: 20px;
- left: -8rpx;
- top: -8rpx;
- border-left: 4rpx solid #fff;
- border-top: 4rpx solid #fff;
- box-sizing: content-box;
- }
- .frame-left-bottom {
- position: absolute;
- width: 20px;
- height: 20px;
- left: -8rpx;
- bottom: -4rpx;
- border-left: 4rpx solid #fff;
- border-bottom: 4rpx solid #fff;
- box-sizing: content-box;
- }
- .frame-right-top {
- position: absolute;
- width: 20px;
- height: 20px;
- right: -4rpx;
- top: -8rpx;
- border-right: 4rpx solid #fff;
- border-top: 4rpx solid #fff;
- box-sizing: content-box;
- }
- .frame-right-bottom {
- position: absolute;
- width: 20px;
- height: 20px;
- right: -4rpx;
- bottom: -4rpx;
- border-right: 4rpx solid #fff;
- border-bottom: 4rpx solid #fff;
- box-sizing: content-box;
- }
- }
- }
- // 底部工具栏
- .toolbar {
- position: absolute;
- width: calc(100% - 64rpx);
- height: 100rpx;
- left: 0;
- bottom: 10rpx;
- text-align: center;
- display: flex;
- justify-content: space-between;
- padding: 0 32rpx;
- align-items: center;
- // IOS 底部安全距离
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- .btn-cancel {
- width: 112rpx;
- font-size: 28rpx;
- color: #d5dfe5;
- font-weight: bold;
- }
- .btn-rotate {
- width: 112rpx;
- font-size: 28rpx;
- color: #d5dfe5;
- font-weight: bold;
- image {
- width: 60rpx;
- height: 60rpx;
- }
- }
- .btn-confirm {
- font-size: 28rpx;
- color: #ffffff;
- font-weight: bold;
- width: 112rpx;
- height: 60rpx;
- line-height: 60rpx;
- background: #07c160;
- border-radius: 6rpx;
- text-align: center;
- }
- }
- .transit {
- transition: width 0.3s, height 0.3s, left 0.3s, top 0.3s, transform 0.3s;
- }
- }
- .showPage {
- opacity: 1 !important;
- }
- }
|