UNPKG

react-clipper

Version:

A responsive image clipper tool for React.

93 lines (81 loc) 1.71 kB
/* component */ .clipper-wrap { box-sizing: border-box; } .clipper-wrap .clipper-main { width: 500px; height: 500px; position: relative; background: #f2f2f2; display: inline-block; float: left; text-align: center; } .clipper-wrap .clipper-sub .preview { font-size: 13px; color: #888; margin-top: 15px; } .clipper-wrap .clipper-sub .describe { font-size: 12px; color: #888; } .clipper-wrap .clipper-sub .imgItem { background: #fff; border: 1px solid #eee; margin-top: 15px; margin-bottom: 5px; display: inline-block; } .clipper-wrap .clipper-sub #clipped { margin: 0 auto; display: inline-block; } .clipper-wrap .upload-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fafafa; border: 1px solid #d9d9d9; border-radius: 3px; text-decoration: none; display: inline-block; overflow: hidden; font-size: 13px; color: #888; width: 70px; height: 25px; line-height: 26px; cursor: pointer; text-align: center; margin-top: 10px; } .clipper-wrap .upload-btn:hover { border-color: #cccccc; box-shadow: 1px 2px 10px #cccccc; } .clipper-wrap .upload-btn input[type=file] { position: absolute; font-size: 100px; right: 0; top: 0; opacity: 0; filter: alpha(opacity=0); cursor: pointer } .clipper-wrap .clear { position: relative; width: 80px; height: 30px; clear: both; } .clipper-wrap .clipper-sub { padding: 0 10px; height: 500px; text-align: center; background: #f2f2f2; display: inline-block; float: right; box-sizing: border-box; }