javascript
  • html
  • iframe
  • carousel
  • materialize
  • 2017-03-28 4 views 1 likes 
    1

    일반 이미지 대신 Materialize Carousel 메서드에서 Iframe을 삽입하여 슬라이드에 웹 링크를 포함 시켰습니다. Iframe 삽입시 클릭하여 슬라이드를 전환 할 수 없습니다.Materialize의 iframe 회전식 메뉴가 작동하지 않습니다.

    회전 목마 방법 :

    <div class="carousel"> 
        <a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a> 
        <a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a> 
        <a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a> 
        <a class="carousel-item"> <iframe style=' max-height: 700px; max-width: 420px; width: 340px; height: 566px;' src='http://www.website.com' frameborder='0' allowfullscreen scrolling='no'></iframe></a> 
    </div> 
    

    비 활성 슬라이드를 클릭 할 수 없습니다. 클릭하면 활성화되지 않습니다. 은 친절하게 추가, 내가 iframe을의 style 속성에서 솔루션

    답변

    2

    을 찾을 수 있도록 도와 :

    pointer-events: none; 
    

    가 iframe을에 클릭 이벤트를 비활성화 할 수 있습니다. 그러면 클릭 이벤트가 올바르게 Materialize Carousel 플러그인에 적용됩니다.

    +1

    jsfiidle -> https://jsfiddle.net/0pphee0e/ – user1428716

    +0

    감사합니다. 하나의 회전 목마 항목에서 다른 항목으로 이동하는 데 효과적입니다. 하지만 현재 실행중인 컨베이어 항목에 대한 작업을 수행 할 수 없습니다. 내가 가지고있는 모든 Iframe에는 마우스를 올리고 클릭 이벤트가 있습니다. 이 일을 할 수있는 방법은 없나요? – gapc311

     관련 문제

    • 관련 문제 없음^_^