模板:Codepen:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
无编辑摘要
Kangkk​(留言 | 贡献)
无编辑摘要
第9行: 第9行:
   </tabs>
   </tabs>
   |{{#tag:html|
   |{{#tag:html|
     <iframe class="wiki-codepen-iframe" onload="{{#if:{{{style|}}}|
     <iframe class="wiki-codepen-iframe" onload="this.contentWindow.document.body.innerHTML = `{{#if:{{{html|}}}|
         this.contentWindow.document.body.innerHTML =`<style type='text/css\'>{{{style|}}}<style>`;|}}{{#if:{{{html|}}}|
         {{{html|}}}|}}
         this.contentWindow.document.body.innerHTML = document.body.innerHTML + `{{{html|}}}`;|}}{{#if:{{{script|}}}|
      {{#if:{{{style|}}}|
         this.contentWindow.document.body.innerHTML = document.body.innerHTML + `<script type='text/javascript'>{{{script|}}}<script>`;|}}"></iframe>
         {{#tag:style|{{{style|}}}|type=text\/css}}|}}
      {{#if:{{{script|}}}|
         {{#tag:script|{{{script|}}}|type=text\/javascript}}|}}`"></iframe>
     |class=wiki-codepen-preview}}
     |class=wiki-codepen-preview}}
   }}</div></includeonly>
   }}</div></includeonly>

2025年4月30日 (三) 10:21的版本

模板文档[查看] [编辑] [历史] [刷新]

Usage

设置高度大于100,小于500


{{codepen
|id=uuid
|height=400
|html=<div></div>
|style=div {
 display: block;
}
|script=var a=1;
}}

Example