UNPKG

scorpio-menu

Version:

react右键菜单

93 lines 1.91 kB
@keyframes fadein { 0%{ opacity: 0; } 100%{ opacity: 1; } } .scorpio-menu { &-container { position: absolute; z-index: 19911111; animation: fadein ease-in-out 150ms; animation-fill-mode: forwards; &.show { display: block; } &.hide { display: none; } } &-submenu-container { position: absolute; left: 100%; top: 0; margin-left: 5px; animation: fadein ease-in-out 150ms; animation-fill-mode: forwards; &.hide{ display: none; } &.show{ display: block; } } &-list { list-style: none; outline: none; position: relative; list-style-type: none; padding: 4px 0; margin: 0; text-align: left; background-color: #fff; border-radius: 4px; -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); .scorpio-menu-item { position: relative; min-width: 80px; padding: 5px 12px; margin: 0; font-size: 14px; font-weight: normal; color: rgba(0, 0, 0, 0.65); white-space: nowrap; cursor: pointer; transition: all .2s; line-height: 22px; &:after{ content: ''; position: absolute; top: 0; right: -5px; width: 5px; height: 100%; cursor: default; } &:hover:not(.disabled) { background-color: #f7f7f7; } &.disabled { color: rgba(0, 0, 0, .25); cursor: not-allowed; } .scorpio-menu-submenu-icon { position: absolute; width: 12px; height: 12px; top: 10px; right: 5px; background-image: url(./imgs/submenu-icon.png); background-size: 100% 100%; } } .divider { height: 1px; overflow: hidden; background-color: #e8e8e8; line-height: 0; } } }