$module-content-bg: #EDEDED; $image-file-upload-width: 150px; $image-file-upload-height: 100px; $avatar-file-upload-width: 100px; $avatar-file-upload-height: 100px; $audio-file-upload-width: 150px; $audio-file-upload-height: 40px; $file-upload-width: 150px; $file-upload-height: 40px; $video-file-upload-width: 150px; $video-file-upload-height: 100px; .avatars_choose_container { position: absolute; padding: 60px 49px 50px; width: 400px; border: 1px solid #B3B3B3; border-radius: 8px; background-color: $module-content-bg; z-index: 1000; box-shadow: 0 5px 10px rgba(0,0,0,.2); .arrow, .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; border-width: 10px; } .arrow { position: absolute; top: -11px; left: 50%; margin-left: -11px; border-width: 11px; border-top-width: 0; border-bottom-color: #B3B3B3; &:after { top: 1px; margin-left: -10px; content: " "; border-top-width: 0; border-bottom-color: $module-content-bg; } } .close { position: absolute; right: 20px; top: 10px; font-size: 24px; font-weight: normal; } .nav-tabs { li { width: 33.3333%; } a { border-radius: 0; color: #999999; width: 100%; padding: 8px 0; text-align: center; } } .tab-pane { margin-top: 4px; font-size: 0; } .square { display: inline-block; width: 50px; height: 50px; background-color: #EDEDED; border: 1px solid $module-content-bg; img { width: 100%; height: 100%; vertical-align: baseline; cursor: pointer; &:hover { border: 1px solid #EDEDED; } } } } .ui-upload { width: 100%; overflow: visible; .ui-upload-type { display: block; position: relative; background: #fefefe; border: 1px dashed #d3d3d3; box-shadow: inset 0 1px 1px white; &:hover { background: #eee; border-style: solid; } } .ui-wrap { position: absolute; top: 0; left: 0; bottom: 0; right: 0; } .ui-upload-tag { z-index: 3; color: #ccc; .glyphicon { font-size: 22px; display: block; width: 22px; height: 22px; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; margin: auto; } } .ui-upload-progress { z-index: 2; display: none; background: #428bca; text-align: center; color: #ffffff; font-weight: bold; width: 0%; -webkit-transition: width 0.8s ease; transition: width 0.8s ease; } .ui-upload-preview { z-index: 4; display: none; } .ui-upload-file { z-index: 5; overflow: hidden; .file { opacity: 0; -webkit-appearance: 0; cursor: pointer; position: absolute; top: 0; left: 0; right: 0; bottom: 0; filter:alpha(opacity=0); opacity: 0; } } .ui-upload-close { position: absolute; z-index: 10; display: none; right: -10px; top: -10px; width: 24px; height: 24px; border-radius: 30px; box-shadow: 1px 1px 2px rgba(0,0,0,.5), -1px -1px 2px rgba(0,0,0,.5); background: black; border: 2px solid white; text-align: center; cursor: pointer; span { font-size: 12px; color: white; } } // 上传中 &.uploading { .ui-upload-file { display: none; } .ui-upload-progress { display: block; } } // 上传完成 &.uploaded { .ui-upload-file, .ui-upload-tag { display: none; } .ui-upload-preview { display: block; } .ui-upload-type, .ui-upload-type:hover { border: none; background: transparent; } .ui-upload-type:hover { .ui-upload-close { display: block; } } .ui-type-file, .ui-type-file:hover { background: #eee; border: 1px solid #d3d3d3; } } // 指定对应容器的大小 // type = image .ui-type-image, .ui-type-image img { width: $image-file-upload-width; height: $image-file-upload-height; } // type = avatar .ui-type-avatar, .ui-type-avatar img { width: $avatar-file-upload-width; height: $avatar-file-upload-height; border-radius: $avatar-file-upload-width; } // type = audio .ui-type-audio, .ui-type-audio audio { width: $audio-file-upload-width; height: $audio-file-upload-height; } // type = file .ui-type-file { width: $file-upload-width; height: $file-upload-height; } .ui-type-file .ui-upload-preview { overflow: hidden; a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-indent: 20px; line-height: $file-upload-height; } } // type = video .ui-type-video, .ui-type-video video { width: $video-file-upload-width; height: $video-file-upload-height; } }