暂未获取文章来源
子比添加抖音斜体生成页面
首页>>技术教程>>正文
本篇文章更新于 2022-05-14 19:07:09
本篇文章更新于 2022-05-14

食用教程

后台添加页面,选择组件自定义html,将下方代码复制填入即可,不需要选择模板

演示效果:

点我前往

代码

<div class="wp-block-zibllblock-alert alert-dismissible fade in"><div class="alert jb-green" data-isclose="false" role="alert"><strong><qc style="color:#ef0c7e;background:undefined">温馨提示:</qc></strong><qc style="color:#333;background:undefined"><strong>输入你的抖音昵称或者评论,点击生成,然后复制生成得到的字体即可直接使用。</strong></qc></div></div>






  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
.youname{width: 100%; height: 37px; border: none; box-shadow: 1px 1px 3px #584d69; border-radius: 2px; margin-bottom: 20px; margin-top: 20px; outline: none; padding-left: 10px; box-sizing: border-box; line-height: 37px; font-size: 16px;} .apptitle{font-size: 24px; color: #ffffff; font-weight: bold; text-shadow: 2px 2px 2px #fd2a2a; font-style: italic;} .button1{padding: .75rem; background-image: linear-gradient(to bottom right,rgba(255,255,255,.2),rgba(255,255,255,.01)); box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.1); background-color: #dc3545!important; border: none; width: 100%; color: #ffffff; border-radius: 2px; outline: none;} .result{width: 100%; height: 80px; border: none; box-shadow: 1px 1px 3px #584d69; border-radius: 2px; outline: none; box-sizing: border-box; background-color: #ffffff; margin-bottom: 10px; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 24px;}
.apptitle {
    font-size: 24px;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 2px 2px 2px #fd2a2a;
    font-style: italic;
}
  </style>


  <div class="doc">
    <input placeholder="请输入抖音昵称,例如:源日记QIUMO" id="youname" class="youname">
    <div class="result" id="result"></div>
    <button class="button1" onclick="ok()">点击生成</button>
  </div>
<!--wp-compress-html--><!--wp-compress-html no compression-->
  <script>
    const baseText = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    const LowerCase = ['?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?']
    const UpperCase = ['?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?','?']
    function ok() {
      var input = document.getElementById('youname')
      var result = ''
      for (var i of input.value) {
        if (/[A-Za-z]/.test(i)) {
          var index = baseText.indexOf(i.toLocaleUpperCase())
          if (/[a-z]/.test(i)) {
            result += UpperCase [index]
          } else {
            result += LowerCase[index]
          }
        } else {
          result += i
        }
      }
      document.getElementById('result').innerText = result
    }
  </script>
<!--wp-compress-html--><!--wp-compress-html no compression-->





<p> </p>



<p> </p>



<p> </p>



<p> </p>

历史上的今天

很遗憾~,历史上的今天未发表过文章
技术教程

子比顶部添加彩色进度条

2022-5-12 15:47:33

技术教程

网站调用哔哩哔哩、腾讯、爱奇艺、优酷、虎牙直播等外链视频自适应教程

2022-5-14 16:21:11

重要说明

本站资源大多来自网络,如有侵犯你的权益请联系管理员或给邮箱发送邮件zhouqiuqiu123@foxmail.com 我们会第一时间进行审核删除。站内资源为网友个人学习或测试研究使用,未经原版权作者许可,禁止用于任何商业途径!请在下载24小时内删除!


如果遇到评论下载的文章,评论后刷新页面点击对应的蓝字按钮即可跳转到下载页面本站资源少部分采用7z压缩,为防止有人压缩软件不支持7z格式,7z解压,建议下载7-zip(点击下载),zip、rar解压,建议下载WinRAR(点击下载)

敏而好学,不耻下问。——孔子