mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Simplify text-selection example.
This commit is contained in:
parent
e8af56ffc5
commit
c6f8244ce5
3 changed files with 57 additions and 67 deletions
|
@ -2,13 +2,24 @@ body {
|
|||
font-family: arial, verdana, sans-serif;
|
||||
}
|
||||
|
||||
.pdf-content {
|
||||
/* Allow absolute positioning of the canvas and textLayer in the page. They
|
||||
will be the same size and will be placed on top of each other. */
|
||||
.pdfPage {
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
|
||||
.pdfPage > canvas {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* CSS classes used by TextLayerBuilder to style the text layer divs */
|
||||
|
||||
/* This stuff is important! Otherwise when you select the text, the text in the divs will show up! */
|
||||
/* This stuff is important! Otherwise when you select the text,
|
||||
the text in the divs will show up! */
|
||||
::selection { background:rgba(0,0,255,0.3); }
|
||||
::-moz-selection { background:rgba(0,0,255,0.3); }
|
||||
|
||||
|
@ -30,28 +41,3 @@ body {
|
|||
white-space: pre;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.textLayer .highlight {
|
||||
margin: -1px;
|
||||
padding: 1px;
|
||||
|
||||
background-color: rgba(180, 0, 170, 0.2);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.textLayer .highlight.begin {
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
}
|
||||
|
||||
.textLayer .highlight.end {
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
}
|
||||
|
||||
.textLayer .highlight.middle {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.textLayer .highlight.selected {
|
||||
background-color: rgba(0, 100, 0, 0.2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue