模板:Codepen:修订间差异
来自康健生活
无编辑摘要 |
无编辑摘要 |
||
| 第9行: | 第9行: | ||
</tabs> | </tabs> | ||
|{{#tag:html| | |{{#tag:html| | ||
<iframe class="wiki-codepen-iframe" onload="this.contentWindow.document.body.innerText={{#if:{{{html|}}}| | <iframe class="wiki-codepen-iframe" onload="this.contentWindow.document.body.innerText=String({{#if:{{{html|}}}| | ||
{{{html|}}}|}} | {{{html|}}}|}} | ||
{{#if:{{{style|}}}| | {{#if:{{{style|}}}| | ||
{{#tag:style|{{{style|}}}|type=text\/css}}|}} | {{#tag:style|{{{style|}}}|type=text\/css}}|}} | ||
{{#if:{{{script|}}}| | {{#if:{{{script|}}}| | ||
{{#tag:script|{{{script|}}}|type=text\/javascript}}|}}"></iframe> | {{#tag:script|{{{script|}}}|type=text\/javascript}}|}})"></iframe> | ||
|class=wiki-codepen-preview}} | |class=wiki-codepen-preview}} | ||
}}</div></includeonly> | }}</div></includeonly> | ||
2025年4月30日 (三) 09:44的版本
这个文档嵌入自模板:Codepen/doc
。
Usage
设置高度大于100,小于500
{{codepen
|id=uuid
|height=400
|html=<div></div>
|style=div {
display: block;
}
|script=var a=1;
}}