博客常用代码
-
网页嵌入
<p style="position: relative; padding: 30% 45%; text-align: left;"> </p> <div style="position: relative; padding: 30% 45%;"><iframe style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;" src="http://1230.la/" frameborder="no" scrolling="no" width="320" height="240"></iframe></div>
-
音频嵌入(支持嗅探电台)
<audio width="300" height="32" controls="controls" autoplay="autoplay"><source src="https://lhttp.qingting.fm/live/1007/64k.mp3" type="audio/mp3" /> Your browser does not support the <img src="https://common.cnblogs.com/editor/tiny_mce/themes/advanced/img/trans.gif" class="mceItemMedia mceItemAudio" width="300" height="32" data-mce-json="{'video':{'attrs':{},'sources':[]},'params':{},'video_html':' element. ','hspace':null,'vspace':null,'align':null,'bgcolor':null}" /> </audio>
-
视频嵌入
<div style="position: relative; padding: 30% 45%;"><iframe style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;" src="https://player.bilibili.com/player.html?aid=62035292&bvid=BV19t411u7rL&cid=107848905&as_wide=1&high_quality=1&danmaku=0" frameborder="no" scrolling="no" width="320" height="240"></iframe></div>
- 夜间模式
script src="https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js"></script> <script> function addDarkmodeWidget() { new Darkmode().showWidget(); } window.addEventListener('load', addDarkmodeWidget); </>
以上改src指向链接即可,音频嵌入还需要改格式。