import styled from 'styled-components'; const ImgWrapper = styled.div` position: relative; img { width: 100%; height: 100%; } .switch { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; cursor: pointer; &.prev { left: 8px; } &.next { right: 8px; } } .pic { overflow: hidden; transition: all 0.4s; padding: 5px 5px 0px 0px; animation: slideIn 0.5s; vertical-align: top; position: relative; text-align: center; background: rgba(0, 0, 0, 0.3); img { height: calc(100% - 18px); } } .addr { display: flex; justify-content: space-between; width: 100%; background: rgba(0, 0, 0, 0.6); font-size: 14px; padding: 0 4px; height: 22px; position: absolute; bottom: 0; .desc { width: 80%; overflow: hidden; text-overflow: ellipsis; text-align: left; color: #fff; } .full { height: 16px; width: 16px; cursor: pointer; img { display: initial; } } } `; const FullImg = styled.div` position: fixed; top: 0; left: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.8); z-index: 999999; display: flex; justify-content: center; align-items: center; animation: bgAni 0.4s; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; @keyframes bgAni { from { background: rgba(0, 0, 0, 0); } to { background: rgba(0, 0, 0, 0.8); } } img { max-width: 80%; max-height: 80%; animation: scaleAni 0.3s; } .close { position: absolute; font-size: 26px; right: 20px; top: 20px; width: 30px; cursor: pointer; } .switch { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; cursor: pointer; &.prev { left: 12px; } &.next { right: 12px; } } `; export { ImgWrapper, FullImg };