会员仅9.9元起,全站资源无限制ALL免费下载!

子比主题 – 侧边百度一下简约样式(带打字效果)

文章最后更新时间:2025-09-08 09:35:36

这个小工具可以协助网站优化百度 SEO,让用户在浏览我们网站的时候协助我们seo,最早是在 emlog 程序才有的,现在 WordPress 程序也是可以完美适配的文章源自奇客源码-https://www.qkget.cn/6003.html

图片[1]-子比主题 – 侧边百度一下简约样式(带打字效果)-奇客源码文章源自奇客源码-https://www.qkget.cn/6003.html

代码部署

定位:WP后台–>>外观–>>小工具–>>自定义HTML,直接将下面的代码丢到里面,然后放到侧边即可!
[wechat2 key=dmhdzh reply=卡密]文章源自奇客源码-https://www.qkget.cn/6003.html

<style>
.searchs {
    background-color: var(--main-bg-color);
    padding: 15px;
    overflow: hidden;
    transition: all 0.3s;
    border-radius: 4px;
    position: relative;
    margin: 20px 0 25px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-top: 2px solid rgba(51, 133, 255, 0.2);
}
mip-form form {
    position: relative;
    display: flex;
    align-items: center;
}
.searchs input[type="text"] {
    border: 2px solid #3385FF;
    border-right: none;
    border-radius: 4px 0 0 4px;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
    height: 38px;
    line-height: 18px;
    margin: 0;
    background-color: var(--footer-bg);
}
.searchs input[type="submit"] {
    background: linear-gradient(to bottom, #3385FF, #2a7ae9);
    color: #fff;
    font-size: 14px;
    height: 38px;
    padding: 0 15px;
    border: 2px solid #3385FF;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
    line-height: 18px;
    box-shadow: 1px 0 2px rgba(0,0,0,0.1);
}
.tit {
    background: linear-gradient(to right, #3385FF, #2a7ae9);
    position: relative;
    top: -15px;
    display: inline-block;
    color: #fff;
    padding: 6px 15px;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}
</style>
  <div class="searchs">
    <div class="tit"><strong>百度一下</strong></div>
    <mip-form method="get" url="https://www.baidu.com/s" class="mip-element mip-layout-container">
        <form action="https://www.baidu.com/s" method="GET" target="_blank">
            <input type="text" name="wd" placeholder="正在加载..." id="searchInput">
            <input type="submit" value="搜索">
        </form>
    </mip-form>
</div>
<script>
const pageTitle = document.title.replace(/_百度搜索$/, '').trim() || "艾特领域";
document.addEventListener('DOMContentLoaded', function() {
    const searchInput = document.getElementById('searchInput');
    let i = 0;
    function typeWriter() {
        if (i < pageTitle.length) {
            searchInput.value += pageTitle.charAt(i);
            i++;
            setTimeout(typeWriter, 100); 
        }
    }
    setTimeout(typeWriter, 500);
    searchInput.addEventListener('focus', function() {
        this.select();
    });
});
</script>

[/wechat2]文章源自奇客源码-https://www.qkget.cn/6003.html

文章源自奇客源码-https://www.qkget.cn/6003.html
© 版权声明
THE END
点赞6赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容