Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
planning [2019/01/10 11:40] sioc |
planning [2021/04/15 13:56] (Version actuelle) |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Planning ====== | ====== Planning ====== | ||
< | < | ||
- | <script type=" | + | <style>Â |
+ | .responsive {Â | ||
+ | position: relative;Â | ||
+ | display: block;Â | ||
+ | height: 0;Â | ||
+ | padding: 0;Â | ||
+ | overflow: hidden;Â | ||
+ | } | ||
- | function resizeIFrameToFitContent( iFrame ) { | + | .responsive iframe |
+ | position: absolute;Â | ||
+ | top: 0;Â | ||
+ | left: 0;Â | ||
+ | bottom: 0;Â | ||
+ | height: 100%;Â | ||
+ | width: 100%;Â | ||
+ | border: 0;Â | ||
+ | } | ||
- | iFrame.width = iFrame.contentWindow.document.body.scrollWidth; | + | .plan {Â |
- | iFrame.height = iFrame.contentWindow.document.body.scrollHeight; | + | padding-bottom: |
} | } | ||
+ | </ | ||
+ | <div class=" | ||
- | window.addEventListener(' | + | <iframe src=" |
- | Â | + | |
- | var iFrame = document.getElementById( ' | + | |
- | resizeIFrameToFitContent( iFrame );Â | + | |
- | Â | + | |
- | // or, to resize all iframes:Â | + | |
- | var iframes = document.querySelectorAll(" | + | |
- | for( var i = 0; i < iframes.length; | + | |
- | resizeIFrameToFitContent( iframes[i] );Â | + | |
- | }Â | + | |
- | } );Â | + | |
- | Â | + | |
- | </ | + | |
- | Â | + | |
- | <iframe src=" | + | |
</ | </ | ||
+ | </ | ||
</ | </ |