当前位置: 首页 > news >正文

pdfjs库使用3

.App {

  text-align: center;

  height: 100vh;

  display: flex;

  flex-direction: column;

  background-color: #f5f5f5;

}

/* PDF 查看器容器样式 */

.pdf-viewer {

  flex: 1;

  padding: 20px;

  max-width: 100%;

  margin: 0 auto;

  box-sizing: border-box;

  background-color: white;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

}

/* 控制按钮样式 */

.pdf-controls {

  padding: 10px;

  background-color: #fff;

  border-bottom: 1px solid #eee;

  position: sticky;

  top: 0;

  z-index: 100;

}

.pdf-controls button {

  padding: 8px 16px;

  margin: 0 10px;

  border: none;

  border-radius: 4px;

  background-color: #007bff;

  color: white;

  font-size: 14px;

  cursor: pointer;

  transition: background-color 0.2s;

}

.pdf-controls button:hover {

  background-color: #0056b3;

}

.pdf-controls button:disabled {

  background-color: #cccccc;

  cursor: not-allowed;

}

.pdf-controls span {

  font-size: 14px;

  color: #666;

}

/* PDF 内容容器样式 */

.pdf-container {

  margin-top: 20px;

  padding: 0 10px;

  overflow-y: auto;

  -webkit-overflow-scrolling: touch; /* 为 iOS 设备提供平滑滚动 */

}

/* Canvas 容器样式 */

canvas {

  max-width: 100%;

  height: auto;

  margin: 0 auto;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

}

/* 移动设备适配 */

@media screen and (max-width: 768px) {

  .pdf-viewer {

    padding: 10px;

  }

  .pdf-controls {

    padding: 8px;

  }

  .pdf-controls button {

    padding: 6px 12px;

    font-size: 12px;

  }

  .pdf-controls span {

    font-size: 12px;

  }

}

/* BlackBerry Access 浏览器特定优化 */

@supports (-webkit-touch-callout: none) {

  .pdf-container {

    /* 防止 iOS 设备上的橡皮筋效果 */

    overscroll-behavior: none;

  }

  /* 优化触摸响应 */

  .pdf-controls button {

    min-height: 44px; /* 确保触摸目标足够大 */

    touch-action: manipulation; /* 优化触摸事件 */

  }

}

/* 加载状态样式 */

.loading {

  display: flex;

  justify-content: center;

  align-items: center;

  height: 100px;

  color: #666;

}

/* 错误状态样式 */

.error {

  color: #dc3545;

  padding: 20px;

  text-align: center;

}

/* 页面计数器样式 */

.page-counter {

  margin: 0 15px;

  font-weight: 500;

}

/* 确保整个应用程序填充视口 */

html, body {

  margin: 0;

  padding: 0;

  height: 100%;

  width: 100%;

}

/* 滚动条样式优化 */

::-webkit-scrollbar {

  width: 8px;

  height: 8px;

}

::-webkit-scrollbar-track {

  background: #f1f1f1;

}

::-webkit-scrollbar-thumb {

  background: #888;

  border-radius: 4px;

}

::-webkit-scrollbar-thumb:hover {

  background: #555;

}

http://www.dtcms.com/a/141805.html

相关文章:

  • 语音合成之二TTS模型损失函数进化史
  • Nacos安装及数据持久化
  • YOLOv5、YOLOv6、YOLOv7、YOLOv8、YOLOv9、YOLOv10、YOLOv11、YOLOv12的网络结构图
  • 【教程】无视硬件限制强制升级Windows 11
  • 用 NLP + Streamlit,把问卷变成能说话的反馈
  • PyCharm入门导览
  • 深度学习-全连接神经网络-1
  • 解析:深度优先搜索、广度优先搜索和回溯搜索
  • 通信算法之269 : OFDM信号的循环自相关特性用于无人机图传信号识别
  • 第 3 期:逆过程建模与神经网络的作用(Reverse Process)
  • 【MySQL数据库入门到精通】
  • Harmony5.0 设置应用全屏模式,隐藏导航栏和状态栏
  • Houdini python code:参数指定文件路径
  • TVM计算图分割--Collage
  • transient关键字深度解析
  • Linux 网络接口 /sys/class/net/eth0 文件详解
  • AI的出现,是否能替代IT从业者?
  • webgl入门实例-10正交投影基本概念
  • C++ AVL树
  • 自学C语言——指针详解(一)
  • 网站制作公司哪家好?如何选择靠谱的网站设计公司
  • 卷积神经网络(CNN)与VGG16在图像识别中的实验设计与思路
  • 工商业光伏发电自发自用余电不上网?“防逆流装置”怎么选?
  • 在msys2里面编译antlr4的过程记录
  • 《软件设计师》复习笔记(12.1)——范围管理、进度管理
  • 美信监控易告警:功能强大
  • 深度学习总结(21)
  • device_fingerprint、device_id、hmac生成
  • 2d深度预测
  • MQ基础篇