mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-14 19:32:15 +01:00
feat(chromium): screenshot a single element via the selector form field (#947)
This commit is contained in:
28
test/integration/testdata/screenshot-selector-html/index.html
vendored
Normal file
28
test/integration/testdata/screenshot-selector-html/index.html
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Element screenshot</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 40px;
|
||||
background: #ffffff;
|
||||
}
|
||||
/* A spacer pushes the target away from the origin so the clip has to
|
||||
account for the element offset, not just its size. */
|
||||
.spacer {
|
||||
height: 120px;
|
||||
}
|
||||
#target {
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
background: #ff0000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="spacer"></div>
|
||||
<div id="target"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user