html
  • object
  • pdf
  • responsive-design
  • division
  • 2017-11-30 18 views 0 likes 
    0

    div에 object 태그가 있고 object 태그에 pdf 파일이 있습니다. div 자체는 반응이 있지만 pdf 자체를 객체와 함께 확장 할 수는 없습니다. 나는 2 screens-PDF가 객체 내에서 응답하지 않습니다.

    screenshot

    의 차이 코드 - 표시됩니다

    <div class="wrapper"> 
    <div style="width: 62.5%"> 
    <div style='position: relative; width: 100%; height: 0px; padding- 
    bottom: 56.3%;'> 
    <a><object style='position: absolute; left: 27.8%; top: 0px; width: 
    100%; height: 231%' type="application/pdf" data="resume.pdf" 
    class="border"></a> 
    </div> 
    </div> 
    </div> 
    
    여기에 작동합니다

    응답 디자인 및 iframe 태그는 HTML과 CSS 코드

    <div class="flex-container"> 
    
        <section class="first"> 
    
        <div id="container"> 
         <iframe src="docs/your.pdf" ></iframe> 
        </div> 
    </div> 
    

    CSS

    에게 있습니다
    +0

    PDF 파일을 검사하십시오. 기본 확대/축소 수준이 포함 된 시작 설정을 가질 수 있습니다. 해당 레벨이 고정 된 비율에 있고 페이지 너비에 맞춰 설정되지 않은 경우 관찰 된 동작이 예상됩니다. – mkl

    +0

    Adobe Reader에서보고 있는데 확대/축소 설정은 브라우저가 아닌 내 컴퓨터에서 보는 방법에만 적용됩니다. 이 방법으로 만 작동할까요? –

    +0

    @JasonStylls이 (가) 몇 가지 새로운 코드를 게시했습니다. – Grendel

    답변

    0
    #container{ 
    position: relative; 
    padding-bottom: 70.25%;/*was 56.28*/ 
    padding-top: 35px; 
    height: 0; 
    overflow: hidden; 
    } 
    
    #container iframe{ 
    position: absolute; 
    top:0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    } 
    

    이 코드는 내장 된 youtube 비디오 용으로 작성되었습니다. PDF 파일을 변경하십시오.

     관련 문제

    • 관련 문제 없음^_^