Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

javascript - 垂直移动。 嵌入式PDF滚动条到左侧(Move vert. scrollbar of embedded PDF to left side)

I'm trying to move the vertical scrollbar of an embedded PDF to the left side of the screen.

(我正在尝试将嵌入式PDF的垂直滚动条移到屏幕的左侧。)

I don't want it to scroll down the length of the div, but rather scroll down the length of the PDF (just like the default scrollbar bar on the right does).

(我不希望它向下滚动div的长度,而是向下滚动PDF的长度(就像右边的默认滚动条一样)。)

I've tried:

(我试过了:)

#pdf {
  top: 28px;
  width: 50%;
  height: auto;
  bottom: 0px;
  position: absolute;
  overflow-y: scroll;
  direction: rtl;
}

This has created an additional scrollbar on the left hand side but it scrolls the div length - it does not scroll down the PDF document.

(这在左侧创建了一个附加的滚动条,但它滚动了div长度-不会向下滚动PDF文档。)

So I tried giving the embed element an id (id="pdfEmbed) and gave it the 'rtl' treatment:

(因此,我尝试为embed元素提供一个id(id =“ pdfEmbed)并给予'rtl'处理:)

#pdfEmbed {
  overflow-y: scroll;
  direction: rtl;
}

Unfortunately, this doesn't appear to do anything (doesn't even add an additional vert. scrollbar).

(不幸的是,这似乎无能为力(甚至都没有添加额外的垂直滚动条)。)

Any help would be greatly appreciated.

(任何帮助将不胜感激。)

Also, please no jquery.

(另外,请不要使用jquery。)

Thanks

(谢谢)

  ask by Normajean translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...