pdfjs库使用2

.pdf-viewer {

  display: flex;

  flex-direction: column;

  align-items: center;

  width: 100%;

  height: 100%;

}

.pdf-controls {

  display: flex;

  gap: 1rem;

  margin: 1rem 0;

  align-items: center;

}

.pdf-container {

  width: 100%;

  overflow: auto;

  -webkit-overflow-scrolling: touch;

}

.canvas-container {

  position: relative;

  margin: 0 auto;

}

.pdf-canvas {

  display: block;

  margin: 0 auto;

}

.link-layer {

  position: absolute;

  top: 0;

  left: 0;

  right: 0;

  bottom: 0;

}

.link-layer a {

  position: absolute;

  background: transparent;

  pointer-events: auto;  /* 使链接可点击 */

}

/* 可选:添加链接悬停效果 */

.link-layer a:hover {

  background: rgba(0, 0, 255, 0.1);

  outline: 1px solid rgba(0, 0, 255, 0.2);

}

你可能感兴趣的:(javascript,前端,css)