18910140161

HTML-如何使弹出式div站在页内-堆栈溢出

顺晟科技

2022-10-19 14:15:56

123

我在网页中出现了一些关于弹出的css问题

以下是它的外观:

以下是我的代码库:

let popupStyles = {};

if (this.props.useRefToPosition) {
  popupStyles = {
    position: 'fixed',
    left: this.state.leftRefPosition,
    top: this.state.topRefPosition - (this.state.popupHeight + 10) ,
    bottom: 'unset'
  };
}

    <div
      style={popupStyles}
      className={`tool-tip-popup ${pos.toString()} ${(this.state.show && this.props.disabled !== true) ? "show" : ""}`}
      id="tool-tip-popup-question"
      data-testid={this.props.dataTestId ? `${this.props.dataTestId}-popup` : null}
      ref={this.popupRef}
    >
      {this.tooltipPopup(tooltipId)}
    </div>

顺晟科技:

  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航