UNPKG

zui

Version:

一个基于 Bootstrap 深度定制开源前端实践方案,帮助你快速构建现代跨屏应用。

136 lines (123 loc) 2.91 kB
/// ======================================================================== /// ZUI: lightbox.less /// http://openzui.com /// ======================================================================== /// Copyright 2014-2020 cnezsoft.com; Licensed MIT /// ======================================================================== // Lightbox style for module lightbox.js [data-toggle="lightbox"] {cursor: pointer} .modal-lightbox { .close { display: block; font-size: 14px; text-align: center; width: 40px; height: 40px; background-color: @color-dark; background-color: fade(@color-dark, 20%); position: absolute; right: 0; top: 0; color: #fff; z-index: 10; .transition-fast(opacity, background-color); .opacity(.8); } .controller { display: none; height: 100%; line-height: 100%; top: 0; position: absolute; cursor: pointer; color: #fff; padding: 0; background-color: transparent; border: none; outline: none; .transition-fast(background); &.show { display: block } > .icon { display: inline-block; width: 60px; height: 50px; line-height: 50px; text-shadow: 0 1px 2px rgba(0,0,0,.6); background-color: transparent; .transition-fast(background); &:before { font-size: 20px; } } &.prev { left: 0; } &.next { right: 0; } } .modal-dialog { border: none; position: relative; -webkit-box-shadow: none; box-shadow: none; background: none; max-width: 100%; max-height: 100%; margin-bottom: 0; .transition(); &:hover, &:focus { .close { .opacity(1); background-color: fade(@color-dark, 50%); &:hover { background-color: fade(@color-dark, 90%); } } .controller { > .icon { background-color: @color-dark; background-color: fade(@color-dark,50%); text-shadow: none; } &:hover { > .icon { background-color: @color-dark; background-color: fade(@color-dark, 90%); } } } } } .caption { display: none; } &.lightbox-with-caption { .caption { display: block; position: absolute; width: 100%; bottom: 0; padding: 10px 15px; color: #fff; background: rgba(0, 0, 0, .15); text-shadow: 1px 1px 0 rgba(0, 0, 0, .3); opacity: .5; text-align: center; .transition(); } .modal-dialog:hover .caption { opacity: 1; background: rgba(0, 0, 0, .6); } } } .lightbox-img { width: inherit; height: auto; max-width: 100%; display: block; padding: 0; margin: 0 auto; -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); box-shadow: 0 5px 15px rgba(0, 0, 0, .5); cursor: pointer; .transition(); }