页脚美化代码块

发布于 2024-06-28  605 次阅读


🤖 由 ChatGPT 生成的文章摘要
此内容根据文章生成,并经过人工审核,仅用于文章内容的解释与总结

介绍几个页脚美化的代码块,内联潜入了css样式,你只需要放到footer.php<footer/>标签内即可。

1、备案信息

</span>
<span style="display: inline-flex; align-items: center; color: black; font-size: 14px;">
  <a href="https://beian.miit.gov.cn" title="ICP备案查询" target="_blank" style="display: inline-flex; align-items: center; text-decoration: none; color: black;"><img src="https://origz.com/icpbeian.png" alt="ICP备案图标" style="height: 14px; margin-right: 5px;">津ICP备xxxxxxxxxx号</a>
</span>
<span style="margin: 0 5px;"> | </span>
<span style="display: inline-flex; align-items: center; color: black; font-size: 14px;">
  <a href="https://beian.mps.gov.cn/#/query/webSearch?code=xxxxxxxxxx" title="公安备案查询" target="_blank" style="display: inline-flex; align-items: center; text-decoration: none; color: black;">
    <img src="https://origz.com/gabeian.png" alt="公安备案图标" style="height: 14px; margin-right: 5px;">甘公网安备xxxxxxxxxx</a>
</span>

2、服务支持

<p class="credit" style="text-align: center;">
    本网站由
    <a target="_blank" href="https://https://console.upyun.com/services/cdn/" title="又拍云CDN加速" class="external text-reset" style="text-decoration: none; color: black;">
        <img src="https://cdn.origz.com/cdn/icons/upyun.png" alt="又拍云CDN加速" class="we-icon" style="height: 18px; vertical-align: middle;">    
    </a>
    提供CDN加速服务 | 
    <a target="_blank" href="https://www.aliyun.com/" title="阿里云服务器" class="external text-reset" style="text-decoration: none; color: black;">
        <img src="https://cdn.origz.com/cdn/icons/aliyun.png" alt="阿里云服务器" class="we-icon" style="height: 13px; vertical-align: middle;">   
    </a>
    提供云主机服务 | 
    <a target="_blank" href="https://www.origz.com/" title="源初科技" class="external text-reset" style="text-decoration: none; color: black;">
        <img src="https://cdn.origz.com/cdn/icons/origzero.png" alt="源初科技" class="we-icon" style="height: 15px; vertical-align: middle;">
    </a>
    提供技术支持
</p>

3、网站运行时间+负载查询

<div style="text-align: center; margin-top: 10px;">
        <?php
        // 网站已运行时间代码
        $startDate = '2020-01-01';
        $currentDate = date('Y-m-d');
        $diff = date_diff(date_create($startDate), date_create($currentDate));
        echo '<p style="display: inline-block; margin: 0 5px;">本网站已运行 ' . $diff->y . ' 年 ' . $diff->m . ' 个月 ' . $diff->d . ' 天</p>';
        ?>
        <span style="color: #999; font-size: 14px; display: inline-block; margin: 0 5px;">|</span>
        <?php
        // 页面负载查询代码
        $loadStartTime = microtime(true);
        // 模拟页面加载内容
        usleep(100000); // 模拟加载时间 0.1 秒
        $loadEndTime = microtime(true);
        $loadTime = round($loadEndTime - $loadStartTime, 4); // 四舍五入保留四位小数
        echo '<p style="display: inline-block; margin: 0 5px;">页面加载时间:' . $loadTime . ' 秒</p>';
        ?>
    </div>        

4、Github徽章样式

<p>
    <div style="text-align: center;">
        <div style="display: inline-block; border-radius: 4px; text-shadow: none; font-size: 12px; color: #fff; line-height: 15px; background-color: #ABBAC3; margin-bottom: 5px;">
            <span style="display: inline-block; background-color: #4D4D4D; padding: 4px 4px 4px 6px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;">Sakurairo</span>
            <span style="display: inline-block; padding: 4px 6px 4px 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background-color: #4c1 !important;">by Fuukei</span>
        </div>
        <div style="display: inline-block; border-radius: 4px; text-shadow: none; font-size: 12px; color: #fff; line-height: 15px; background-color: #ABBAC3; margin-bottom: 5px; margin-left: 10px;">
            <span style="display: inline-block; background-color: #4D4D4D; padding: 4px 4px 4px 6px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;">Author</span>
            <span style="display: inline-block; padding: 4px 6px 4px 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background-color: #dfb317 !important;">KEEMO</span>
        </div>
        <div style="display: inline-block; border-radius: 4px; text-shadow: none; font-size: 12px; color: #fff; line-height: 15px; background-color: #ABBAC3; margin-bottom: 5px; margin-left: 10px;">
            <span style="display: inline-block; background-color: #4D4D4D; padding: 4px 4px 4px 6px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;">QQ</span>
            <span style="display: inline-block; padding: 4px 6px 4px 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background-color: #e05d44 !important;">2167588009</span>
        </div>
        <div style="display: inline-block; border-radius: 4px; text-shadow: none; font-size: 12px; color: #fff; line-height: 15px; background-color: #ABBAC3; margin-bottom: 5px; margin-left: 10px;">
            <span style="display: inline-block; background-color: #4D4D4D; padding: 4px 4px 4px 6px; border-top-left-radius: 4px; border-bottom-left-radius: 4px;">Frame</span>
            <span style="display: inline-block; padding: 4px 6px 4px 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background-color: #007ec6 !important;">Wordpress</span>
        </div>
    </div>
</p>

你可以选择要添加的部分或者全部复制添加。