Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有一些子视图(CPImageView、CPTextField 等)的 CPView,我想知道是否可以截取该父视图的屏幕截图。谢谢
不,不是开箱即用...请记住您仍在浏览器中。
现在,取决于你想要这个有多糟糕......不久前有人写了一个通用的 DOM 解析器,而不是将当前的 DOM 渲染到画布上。不过当时还很不成熟。
幸运的是,卡布奇诺通常只使用一些绝对定位的 div 和背景颜色/图像。这意味着如果您想编写自己的解析器,它可能并不像听起来那么难。