标签: HTML

  • 推荐一款Typecho清新风格响应式主题Bubble

    主题介绍

    清新的界面:大气简洁的页面布局,采用 argon design system,元素间隔恰到好处
    
    人性化的设计:登陆后显示后台管理按钮、醒目的文字、方便操作的按钮摆放,以及页面自适应
    
    流畅的用户体验:支持全站 pjax、ajax 实现评论无刷新,采用 jsDelivr CDN 全球加速主题大部分静态资源加载,减小服务器压力
    
    短代码功能:使用主题特殊 HTML 标签实现更丰富的功能,如高亮代码框以及友链卡片
    
    自定义壁纸:首页固定壁纸、其他页面随机壁纸,彰显个性爱好
    
    代码高亮:自带 prism.js 代码高亮,主题丰富,解析迅速
    
    数学公式:自带 KaTeX 数学公式渲染,相比 MathJax 更为轻量、快速
    
    自定义样式:支持用户添加 css 样式,随意调整主题外观
    
    文件轻量:主题.zip格式安装包(去掉.git文件夹后)大小不到 250 KB,简洁而不简单化繁为简,如沐清风。

    截图

    设置

    主题设置页面位置:Typecho 后台->控制台->外观->设置外观。

    更新

    主题有自动检查更新功能,并且能够一键安装更新。

    自动更新按钮设置在主题设置页面中。

    自动更新将从 jsdelivr 的 CDN 上下载最新版本的主题以替换旧版本主题。

    你也可以手动更新,手动更新步骤为:删除旧版本,并安装新版本。

    请注意,由于 Typecho 本身设计的原因,主题更新后可能会添加新的设置项,如果不禁用主题并重新启用(通过启用其他主题),新设置项将被留空并可能导致 Bug,所以请在更新后重启主题,或者请仔细检查是否有留空的设置项(这里主要指选择型设置项,文本类设置项似乎没这个问题)。

    站点副标题

    该项用以设定首页的标题栏中站点标题后显示的文字。

    站点 LOGO

    该项应为一个图片的 URL 地址,将显示在浏览器顶部标签标题左边。

    请勿使用相对地址。

    站点头像

    该项应为一个图片的 URL 地址,将显示在首页大标题上方。

    请勿使用相对地址。

    首页背景图像

    该项应为一个图片的 URL 地址,用以设定网站首页背景图片,留空则使用默认紫色渐变背景。

    请勿使用相对地址。

    随机背景图像地址

    该项应为一个或多个图片的 URL 地址,用以设定网站文章页、独立页面以及其他页面的头图,设定后将从给定的图片中随机抽取一个显示,留空则使用默认紫色渐变背景。

    URL 之间用换行隔开,即每行一个 URL,请勿包含多余字符。

    请勿使用相对地址。

    背景气泡

    该项用以选择是否在首页以及文章页顶部背景处显示半透明气泡。

    页脚左下角文字

    该项用以设定页脚左下角的说明文字,如 Copyright 和 备案信息。

    可添加 HTML 代码以实现更丰富的功能,如跳转链接等。

    页脚小工具

    该项用以选择是否在页面底部显示“最新评论”、“最新文章”和“近期归档”。

    自定义 css

    该项用以提供自定义 css 接口,用户可以填入自己需要的 css 代码来改变主题外观,例如更改字体大小。

    自定义 css 的生效不需要清空缓存。

    全站 pjax 模式

    该项用以选择是否启用全站 pjax 模式提升用户访问体验。

    请注意:开启该功能后可能会导致站点一些功能不正常,例如如果您未使用主题自带数学公式渲染,而是选择使用其他插件实现该功能,则会导致无刷新打开页面时数学公式插件不工作,因此请仔细检查后决定是否开启该模式。

    如果您发现部分功能确实出现了问题,而您又希望开启该模式,则请查看“pjax 回调代码”一项的说明。

  • 【7B2主题美化】首页动态搜索模块

    背景是动态的哦!可自定义视频

    1.b2后台模块管理-首页-添加自定义模块页面选择铺满,放入以下代码

    <!--首页视频区块-->
    <div id="page-wrapper">
    	
    	<div class="home-banner por">
    		<section class="section">
    			<div class="video-wrapper">
    				<video poster="/pic/2f518848202a4.jpg" autoplay playsinline="" loop muted="" src="https://tongji.baidu.com/web5/image/banner/analytics.mp4" __idm_id__="2285569"></video>
    			</div>
    			<div class="video-overlay"></div>
    		</section>
    		<div class="layout-center poa" style="width: 1200px;top: 0;left: 50%;margin-left: -600px;">
    			<div class="home-banner-content clearfix">
    				<div class="slogan-text por fl">
    					<p>
    						森鹿语-二次元拯救世界</p>
    					<i class="iblock poa corner"></i>
    					<p class="promote-sub-title line-one">已发布<span style="display: inline-block;overflow: hidden;line-height: 34px;vertical-align: -9px;">
    							<em id="goal-works" value="5351266">
    								<ps style="color: #26d6c8;">52<ps>
    							</em>
    						</span>篇文章内容,运行了<ps style="color: #26d6c8;">816</ps>天</p>
    				</div>
    			</div>
    			<div class="home-banner-search por searchv2-top-m">
    				<div class="primary-menus" style=" width: 92%; position: unset;transform: translate(1px, 1px);">
    					<div class="search-types-cycles poa">
    						<ul class="selects">
    							<li data-target="search_1">百度 </li>
    							<li data-target="search_2">Bing </li>
    							<li data-target="search_3" class="current">站内搜索 </li>
    							<li data-target="search_4">360 </li>
    							<li data-target="search_5">哔哩哔哩 </li>
    							<li data-target="search_6">头条搜索 </li>
    							<li data-target="search_8">知乎 </li>
    						</ul>
    					</div>
    					<div class="cont">
    						<div class="left-cont">
    							<form class="search hidden" id="search_1" action="https://www.baidu.com/s?wd=" method="get" target="_blank">
    								<input type="text" name="wd" class="s" placeholder="请输入关键词">
    								<button type="submit" name="" class="btn">百度搜索</button>
    							</form>
    							<form class="search hidden" id="search_2" action="https://cn.bing.com/search?q=" method="get" target="_blank">
    								<input type="text" name="q" class="s" placeholder="请输入关键词">
    								<button type="submit" name="" class="btn">Bing搜索</button>
    							</form>
    							<form class="search" id="search_3" action="/?s=" method="get" target="_blank">
    								<input type="text" name="s" class="s" placeholder="请输入关键词">
    								<button type="submit" name="" class="btn">站内搜索</button>
    							</form>
    							<form class="search hidden" id="search_4" action="https://www.so.com/s?q=" method="get" target="_blank">
    								<input type="text" name="query" class="s" placeholder="请输入关键词">
    								<button type="submit" name="" class="btn">360搜索</button>
    							</form>
    							<form class="search hidden" id="search_5" action="https://search.bilibili.com/all?keyword=" method="get" target="_blank">
    								<input type="text" name="q" class="s" placeholder="请输入关键词">
    								<button type="submit" name="" class="btn">哔哩哔哩</button>
    							</form>
    							<form class="search hidden" id="search_6" action="https://so.toutiao.com/search?dvpf=pc&source=input&keyword=" method="get" target="_blank">
    								<input type="text" name="q" class="s" placeholder="请输入关键词">
    								<button type="submit" name="" class="btn">头条搜索</button>
    							</form>
    							<form class="search hidden" id="search_8" action="https://www.zhihu.com/search?q=" method="get" target="_blank">
    								<input type="text" name="q" class="s" placeholder="请输入关键词">
    								<button type="submit" name="" class="btn">知乎搜索</button>
    							</form>
    							<a class="hot-top text-notify" href="/cnjz" target="_blank" tips="教程分享" direction="bottom">
    								<img src="/pic/rank.svg" class="icon-rank" height="15"> 热门教程</a>
    						</div>
    					</div>
    				</div>
    				<p class="home-banner-links line-one">热搜词:<a href="/?s=vip会员页面" target="_blank" class="iblock">vip会员页面</a>
    					<a href="/?s=弹幕高级插件" target="_blank" class="iblock">弹幕高级插件</a>
    					<a href="/?s=bilibili" target="_blank" class="iblock">bilibili</a>
    					<a href="/?s=限制重复评论" target="_blank" class="iblock">限制重复评论</a>
    					<a href="/?s=随机访问浏览量" target="_blank" class="iblock">随机访问浏览量</a>
    				</p>
    				<script src="/hitokoto/?format=js&charset=utf-8"></script>
    				<style>
    					p.home-banner-linkss.line-one1 { width: 80%; font-size: 14px; height: 20px; line-height: 20px; color: #fff; text-shadow: 0 2px 4px rgb(0 0 0 / 27%); margin-top: 40px; text-align: center; }
    				</style>
    				<p class="home-banner-linkss line-one1">
    					<script>
    						hitokoto()
    					</script>
    				</p>
    				<!--<a href="https://shipin520.com/shipin/58.html" target="_blank" class="iblock">美食</a><a href="https://shipin520.com/shipin/53.html" target="_blank" class="iblock">水墨</a><a href="https://shipin520.com/shipin/62.html" target="_blank" class="iblock">航拍</a><a href="https://shipin520.com/shipin/843.html" target="_blank" class="iblock">动感</a><a href="https://shipin520.com/shipin/19.html" target="_blank" class="iblock">粒子</a><a href="https://shipin520.com/shipin/20904.html" target="_blank" class="iblock">VJ</a><a href="https://shipin520.com/shipin/2510.html" target="_blank" class="iblock">演出</a><a href="https://shipin520.com/shipin/32.html" target="_blank" class="iblock">AE模板</a><a href="https://shipin520.com/shipin/589.html" target="_blank" class="iblock">宣传片</a><a href="https://shipin520.com/shipin/54.html" target="_blank" class="iblock">地图</a>-->
    			</div>
    		</div> <!-- 头部快速链接导航 -->
    		<div class="top-navs poa">
    			<div class="layout-center clearfix" style="width: 1200px;">
    				<div class="top-navs-l fl">
    					<div class="top-navs-l-item fl">
    						<p class="top-navs-l-title">
    							<a href="/cnjz/jzzn" target="_blank" class="block">
    								<svg class="icon-dhs" aria-hidden="true">
    									<use xlink:href="#hg-zixun1"></use>
    								</svg> <!-- <img src="//js.shipin520.com/pc/images/home/ae.png" alt="AE模板"> --> 建站指南
    							</a>
    						</p>
    						<p class="top-navs-l-links">
    							<a href="/?s=从零开始" class="fl" target="_blank">五步曲</a>
    							<a href="/961.html" class="fl" target="_blank">备份</a>
    						</p>
    					</div>
    					<div class="top-navs-l-item fl">
    						<p class="top-navs-l-title">
    							<a href="/cnjz/chajian" target="_blank" class="block">
    								<svg class="icon-dhs" aria-hidden="true">
    									<use xlink:href="#hg-huodong"></use>
    								</svg> <!-- <img src="//js.shipin520.com/pc/images/home/pr.png" alt="Pr模板"> --> B2插件
    							</a>
    						</p>
    						<p class="top-navs-l-links">
    							<a href="/169.html" class="fl" target="_blank">统计插件</a>
    							<a href="/921.html" class="fl" target="_blank">弹幕插件</a>
    						</p>
    					</div>
    					<div class="top-navs-l-item fl">
    						<p class="top-navs-l-title">
    							<a href="/cnjz/bmh" target="_blank" class="block">
    								<svg class="icon-dhs" aria-hidden="true">
    									<use xlink:href="#hg-gongwenbao"></use>
    								</svg>B2美化
    							</a>
    						</p>
    						<p class="top-navs-l-links">
    							<a href="/841.html" class="fl" target="_blank">昼夜模式</a>
    							<a href="/576.html" class="fl" target="_blank">会员美化</a>
    						</p>
    					</div>
    					<div class="top-navs-l-item fl">
    						<p class="top-navs-l-title">
    							<a href="/cnjz/wpxg" target="_blank" class="block">
    								<svg class="icon-dhs" aria-hidden="true">
    									<use xlink:href="#hg-chakansousuo"></use>
    								</svg>WP修改
    							</a>
    						</p>
    						<p class="top-navs-l-links">
    							<a href="/1045.html" class="fl" target="_blank">订单通知</a>
    							<a href="/1109.html" class="fl" target="_blank">评论IP</a>
    						</p>
    					</div>
    					<div class="top-navs-l-item fl">
    						<p class="top-navs-l-title">
    							<a href="https://wpa.qq.com/msgrd?v=3&uin=1580292799&site=qq&menu=yes" target="_blank" class="block">
    								<svg class="icon-dhs" aria-hidden="true">
    									<use xlink:href="#hg-dingwei"></use>
    								</svg>合作伙伴
    							</a>
    						</p>
    						<p class="top-navs-l-links">
    							<a href="https://wpa.qq.com/msgrd?v=3&uin=1580292799&site=qq&menu=yes" class="fl" target="_blank">广告投放</a>
    							<a href="https://wpa.qq.com/msgrd?v=3&uin=1580292799&site=qq&menu=yes" class="fl" target="_blank">友情链接</a>
    						</p>
    					</div>
    				</div>
    				<div class="top-navs-m fl">
    					<a href="/gold-top" target="_blank" class="fl">财富排行</a>
    					<a href="/dark-room" target="_blank" class="fl">小黑屋</a>
    					<a href="/task" target="_blank" class="fl">任务大厅</a>
    					<a href="/mission/today" target="_blank" class="fl">签到管理</a>
    				</div>
    				<div class="top-navs-r fl clearfix">
    					<a class="fl" rel="nofollow" target="_blank" href="/verify">
    						<svg class="icon-dhs" aria-hidden="true">
    							<use xlink:href="#hg-yonghu"></use>
    						</svg>
    						<p>高级认证</p>
    					</a>
    					<a class="fl" target="_blank" href="/vips">
    						<svg class="icon-dhs" aria-hidden="true">
    							<use xlink:href="#hg-huiyuan"></use>
    						</svg>
    						<p>会员办卡</p>
    					</a>
    				</div>
    			</div>
    		</div>
    	</div>
    </div>

    2、以下JS代码放入child.js

    没有child.js请在B2主题目录下新建一个

    /*首页动态大图搜索开始*/
    (function($){
      var m=$('.primary-menus');
      if(m.length<1) return;
      var ul=m.find('.selects');
      if(ul.length<1) return;
      var lis=ul.children('li');
      if(lis.length<1) return;
      var s=m.find('.search');
      var sVal=s.find('.s').val();
      lis.on('click',function () {
        var d=$(this).attr('data-target');
        if (d) {
          lis.removeClass('current');
          $(this).addClass('current');
          s.addClass('hidden');
          s.filter('#'+d).removeClass('hidden');
          //s.filter('#'+d).find('.s').val('');
          s.filter('#'+d).find('.s').trigger('focusin');
        }
      });
      s.find('.s').on('focusin',function () {
        if ($(this).val()==sVal) {
          $(this).val('');
        }
      })
      s.find('.s').on('focusout',function () {
        var v=$(this).val();
        if (orz.isEmpty(v)) {
          v=sVal;
        }
        s.find('.s').val(v);
      })
    })(jQuery);
    /*首页动态大图搜索结束*/

    3.引入阿里矢量图标,该链接失效后请自行修改

    这里放在:B2主题设置–>常规设置–>综合设置–>头部HTML标签

    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_3290918_bwveur0fle.css" />
    <script src="//at.alicdn.com/t/font_3290918_bwveur0fle.js"></script>

    4.代码放到你的css样式

    这里放到:点击外观–>点击自定义–>点击额外css–>复制进去发布即可!

    /*首页动态大图开始*/
    @media screen and (max-width: 768px){
        
        .home-banner-links{
            width:100%!important;
        }
        .home-banner-content .slogan-text p {
        font-weight: 400!important;
        font-size: 16px!important;
        line-height: 24px!important;
        letter-spacing: 3px!important;
        text-shadow: 0 2px 4px rgb(0 0 0 / 25%);
        margin-bottom: 0px!important;
    }
        .home-banner-content,.slogan-text.por.fl{
       
        margin-left: 10px!important;
        margin-bottom:10px!important;
        
    }
        .home-banner .search-types-cycles,.home-banner-linkss{
            display:none;
        }
        .layout-center{
            width:100%!important;
            margin-left:0px!important;
            left:0px!important;
        }
        .primary-menus{
            width:100%!important;
        }
     .html-box {
        width: 100%!important;
    }
    .top-navs{
        display:none;
    }
    .home-banner .section {
        position: relative;
        width: 100%;
        overflow: hidden;
        max-height: 400px!important;
        height: 100vh;
    }
    .home-banner{
        height:400px!important;
        width:100%!important;
        
        }
        
        .home-banner-search {
        width: 90%!important;
        margin-left: 10px!important;
        }
    .home-banner-search form {
        margin-left: 10px;
        width: 90%;
    }
    }
        
    #page-wrapper {
    	min-height:100%;
    	margin-top:-10px
    }
    .home-banner {
    	height:600px;
    	position:relative;
    	z-index:1;
    	background-position:0 100%;
    	animation:gradient 12s ease-in-out infinite;
    	margin-bottom:20px;
    }
    .home-banner .section {
    	position:relative;
    	width:100%;
    	overflow:hidden;
    	max-height:600px;
    	height:100vh
    }
    .home-banner .section .video-wrapper {
    	display:flex;
    	justify-content:center;
    	align-items:center;
    	width:100%;
    	height:100%;
    	position:absolute;
    	overflow:hidden;
    	z-index:0
    }
    .home-banner .section .video-wrapper video {
    	visibility:visible;
    	pointer-events:none;
    	position:absolute;
    	top:50%;
    	left:50%;
    	transform:translate(-50%,-50%);
    	height:100%;
    	width:100%;
    	object-fit:cover
    }
    .home-banner .section .video-overlay {
    	height:100%;
    	width:100%;
    	top:0;
    	left:0;
    	position:absolute;
    	background:rgba(45,47,54,.15)
    }
    .home-banner .corner {
    	width:28px;
    	height:21px;
    	border-radius:4px;
    	left:500px;
    	top:0;
    	background:url(/pic/corner-8k.gif) no-repeat;
    	background-size:100%
    }
    .home-banner .home-menus {
    	margin-left:70px
    }
    .home-banner .home-menus .cus-dropbox-trigger a,.home-banner .home-menus>a {
    	color:#fff;
    	font-size:14px;
    	margin-right:20px;
    	line-height:60px
    }
    .home-banner .home-menus .cus-dropbox-trigger a:hover,.home-banner .home-menus>a:hover {
    	color:#21cec0
    }
    .home-banner>.layout-center {
    	height:100%
    }
    .home-banner-content {
    	padding-top:150px;
    	margin-left:182px;
    	margin-bottom:22px
    }
    .home-banner-content .slogan-text p {
    	font-size:18px;
    	line-height:24px;
    	letter-spacing:6px;
    	color:#fff
    }
    .home-banner-content .slogan-text p:nth-of-type(1) {
    	font-weight:600;
    	font-size:28px;
    	line-height:46px;
    	letter-spacing:6px;
    	text-shadow:0 2px 4px rgba(0,0,0,.25);
    	margin-bottom:10px
    }
    .home-banner-search {
    	width:800px;
    	margin-left:209px;
    	height:auto
    }
    .home-banner-search form {
    	margin-bottom:10px
    }
    .home-banner-search form>input {
    	width:100%;
    	height:48px;
    	background:#fff;
    	border-radius:8px 0 0 8px;
    	border:none;
    	padding:18px 22px;
    	font-size:14px;
    	color:#333
    }
    .home-banner-search form>input::placeholder {
    	color:#979797
    }
    .home-banner-search .hot-top {
    	position:absolute;
    	top:13px;
    	right:115px;
    	font-size:13px
    }
    .home-banner-search .hot-top i {
    	margin-right:4px
    }
    .home-banner-search .hot-words-container,.home-banner-search .rec-words-container {
    	width:100%;
    	top:56px
    }
    .home-banner-links {
    	width:80%;
    	font-size:14px;
    	height:20px;
    	line-height:20px;
    	color:#fff;
    	text-shadow:0 2px 4px rgba(0,0,0,.27)
    }
    .home-banner-links a {
    	margin-right:19px;
    	color:inherit
    }
    .home-banner-links a:hover {
    	color:#35eee3
    }
    .home-banner .search-types-cycles {
    	width:106px;
    	height:290px;
    	background:linear-gradient(180deg,rgba(0,0,0,0) 0,rgba(53,238,227,.1445) 51.04%,rgba(0,0,0,0) 100%);
    	left:630px;
    	top:-121px;
    	text-align:center;
    	z-index:-1
    }
    .home-banner .search-types-cycles .search-types-btn {
    	width:100%;
    	height:20px;
    	line-height:20px;
    	cursor:pointer;
    	user-select:none;
    	left:0;
    	bottom:-20px;
    	z-index:1
    }
    .home-banner .search-types-cycles .search-types-btn i {
    	color:#fff;
    	font-size:12px
    }
    .home-banner .search-types-cycles .search-types-btn:nth-of-type(1) {
    	bottom:auto;
    	top:-20px
    }
    .home-banner .search-types-cycles .search-types-btn:nth-of-type(1) i {
    	transform:rotate(180deg)
    }
    .home-banner .search-types-cycles .search-types-btn:hover i {
    	color:#35eee3
    }
    .home-banner .search-types-cycles ul {
    	width:100%;
    	height:100%;
    	padding-top:5px
    }
    .home-banner .search-types-cycles ul:after,.home-banner .search-types-cycles ul:before {
    	content:'';
    	width:1px;
    	height:100%;
    	display:block;
    	position:absolute;
    	left:0;
    	top:0;
    	background:linear-gradient(0,transparent 0,#35eee3 50%,transparent 100%)
    }
    .home-banner .search-types-cycles ul:after {
    	left:auto;
    	right:0
    }
    .home-banner .search-types-cycles ul li {
    	height:40px !important;
    	line-height:40px !important;
    	font-size:16px;
    	color:rgba(255,255,255,.6);
    	text-align:center;
    	cursor:pointer;
    	user-select:none
    }
    .layout-center {
    	width:1200px;
    	margin:0 auto
    }
    .slogan-text.por.fl {
    	margin-left:100px
    }
    .iblock {
    	display:inline-block
    }
    .block {
    	display:block
    }
    .line-one {
    	text-overflow:ellipsis;
    	white-space:nowrap;
    	overflow:hidden
    }
    .line-two {
    	overflow:hidden;
    	display:-webkit-box;
    	-webkit-line-clamp:2;
    	-webkit-box-orient:vertical
    }
    .line-three {
    	overflow:hidden;
    	display:-webkit-box;
    	-webkit-line-clamp:3;
    	-webkit-box-orient:vertical
    }
    .primary-menus .left-cont button {
    	height:48px;
    	box-sizing:border-box;
    	min-width:100px;
    	margin-left:-5px;
    	cursor:pointer;
    	background-color:#65d0c5;
    	color:#fff;
    	font-size:15px;
    	line-height:40px;
    	position:absolute;
    	right:0;
    	top:0;
    	border:1px solid #65d0c5;
    	border-radius:1px;
    	padding:0 15px;
    	width:106px;
    	transform:translateY(0px)
    }
    .home-banner .search-types-cycles ul li:hover {
    	color:#35eee3
    }
    .home-banner .search-types-cycles ul li:nth-of-type(4) {
    	height:80px;
    	line-height:80px
    }
    .home-banner .search-types-cycles ul li a {
    	color:rgba(255,255,255,.6);
    	transition:none
    }
    .home-banner .search-types-cycles ul li a:hover {
    	color:#35eee3
    }
    .home-banner .search-types-cycles button:hover {
    	background:#46dacf !important;
    	opacity:1;
    	transition:opacity .2s
    }
    .home-banner .search-types-cycles button i {
    	font-size:18px;
    	color:#fff;
    	margin-right:6px
    }
    .home-banner .search-types-cycles button span {
    	font-size:16px;
    	color:#fff
    }
    .home-banner:after {
    	content:'';
    	width:100%;
    	height:120px;
    	position:absolute;
    	bottom:0;
    	left:0;
    	background:linear-gradient(180deg,#282a30ab 0,rgba(0,0,0,0) 100%);
    	transform:rotate(-180deg);
    	z-index:0
    }
    .home-banner-search>form>button {
    	box-sizing:border-box;
    	min-width:100px;
    	transform:translateY(0px);
    	font-size:15px;
    	border-top-right-radius:3px;
    	border-bottom-right-radius:3px;
    	position:absolute;
    	right:1px;
    	top:0;
    	z-index:1;
    	border:1px solid #23d1c3;
    	padding:0 15px;
    	width:147px;
    	height:56px;
    	background:linear-gradient(90deg,#35eee3 0,#21cec0 100%);
    	border-radius:0 8px 8px px 0;
    	right:0;
    	text-align:center;
    	padding-left:25px;
    	margin-right:-7px;
    	border-bottom-left-radius:1px;
    	border-top-left-radius:1px
    }
    .home-banner-search .search.hidden {
    	display:none
    }
    a.hot-top.text-notify:hover {
    	color:#26d6c8
    }
    .por {
    	position:relative
    }
    .poa {
    	position:absolute
    }
    .pof {
    	position:fixed
    }
    .clearfix:after {
    	content:'';
    	clear:both;
    	display:block;
    	height:0;
    	visibility:hidden;
    	font-size:0;
    	line-height:0
    }
    .fl {
    	float:left
    }
    .fr {
    	float:right
    }
    .ovh {
    	overflow:hidden
    }
    .hide {
    	display:none
    }
    .nb-icon-wrap {
    	right:-9999px!important
    }
    .icon-rank {
    	width:auto;
    	display:inline-block;
    	border:none;
    	overflow:hidden;
    	vertical-align:-3px
    }
    img.icon-rank {
    	width:20px;
    	height:20px;
    	margin-right:-5px
    }
    .icon-dhs {
    	width:2em;
    	height:2em
    }
    p.top-navs-l-title {
    	margin-bottom:8px
    }
    .top-navs {
    	width:100%;
    	height:70px;
    	bottom:28px;
    	left:0;
    	padding:12px 0;
    	z-index:1
    }
    .top-navs .top-navs-l {
    	width:850px;
    	display:flex;
    	justify-content:center;
    	align-items:center;
    	margin:0 -10px;
    	border-right:1px solid rgba(255,255,255,.25)
    }
    .top-navs .top-navs-l-item {
    	width:132px;
    	margin:0 18px;
    	display:flex;
    	flex-direction:column;
    	justify-content:center;
    	align-items:center
    }
    .top-navs .top-navs-l-item .top-navs-l-title a {
    	font-weight:600;
    	font-size:18px;
    	line-height:25px;
    	height:25px;
    	margin-bottom:12px;
    	color:#fff;
    	text-shadow:1px 1px 1px #000
    }
    .top-navs .top-navs-l-item .top-navs-l-title a i {
    	font-size:34px;
    	margin-right:8px;
    	vertical-align:-4px
    }
    .top-navs .top-navs-l-item .top-navs-l-title a img {
    	float:left;
    	width:34px;
    	height:34px;
    	margin-right:8px;
    	vertical-align:-4px
    }
    .top-navs .top-navs-l-item .top-navs-l-title a:hover {
    	color:#21cec0
    }
    .top-navs .top-navs-l-item .top-navs-l-links {
    	font-size:14px;
    	line-height:20px;
    	display:flex;
    	justify-content:space-around;
    	margin:0 -10px
    }
    .top-navs .top-navs-l-item .top-navs-l-links a {
    	color:#b5b5b5;
    	margin:0 10px;
    	text-shadow:1px 1px 1px #000
    }
    .top-navs .top-navs-l-item .top-navs-l-links a:hover {
    	color:#21cec0
    }
    .top-navs .top-navs-m {
    	width:176px;
    	height:61px;
    	border-right:1px solid rgba(255,255,255,.25);
    	padding:0 24px;
    	display:flex;
    	flex-wrap:wrap;
    	justify-content:space-around;
    	align-items:center
    }
    .top-navs .top-navs-m a,.top-navs .top-navs-m p,.top-navs .top-navs-m>div {
    	width:50%;
    	text-align:center;
    	color:#fff;
    	font-size:14px;
    	line-height:20px;
    	cursor:pointer;
    	user-select:none;
    	text-shadow:1px 1px 1px #000
    }
    .top-navs .top-navs-m a:hover,.top-navs .top-navs-m p:hover,.top-navs .top-navs-m>div:hover {
    	color:#21cec0
    }
    .top-navs .top-navs-m div p,.top-navs .top-navs-m>a {
    	margin-bottom:20px
    }
    .top-navs .top-navs-m div p {
    	width:100%;
    	margin-bottom:0;
    	margin-top:-20px
    }
    .top-navs .top-navs-m .top-navs-m-box {
    	top:-16px;
    	left:-72px;
    	width:157px;
    	height:66px;
    	background:#444;
    	border-radius:8px;
    	padding:8px 14px 0;
    	display:none;
    	margin-top:-70px
    }
    .top-navs .top-navs-m .top-navs-m-box a {
    	margin-bottom:9px
    }
    .top-navs .top-navs-m .top-navs-m-box a:hover {
    	color:#21cec0
    }
    .top-navs .top-navs-r {
    	width:176px
    }
    .top-navs .top-navs-r a {
    	width:50%;
    	padding-left:30px;
    	text-align:center;
    	line-height:34px
    }
    .top-navs .top-navs-r a i {
    	font-size:36px;
    	margin-bottom:10px
    }
    .top-navs .top-navs-r a p {
    	font-size:14px;
    	line-height:20px;
    	color:#b5b5b5;
    	text-shadow:1px 1px 1px #000
    }
    .top-navs .top-navs-r a p:hover {
    	color:#21cec0
    }
    .popular-area {
    	margin-bottom:60px
    }
    .popular-area-top {
    	height:34px;
    	margin-bottom:22px
    }
    .popular-area-top-title {
    	height:34px;
    	line-height:34px;
    	font-weight:600;
    	font-size:24px;
    	color:#4a4a4a;
    	margin-right:94px
    }
    .popular-area-top-title span {
    	height:inherit;
    	font-size:18px;
    	font-weight:100;
    	color:#979797;
    	margin-left:24px;
    	vertical-align:3px;
    	line-height:34px
    }
    .popular-area-top .popular-area-nav {
    	width:116px;
    	height:34px;
    	padding-top:3px
    }
    .popular-area-top .popular-area-nav button {
    	width:28px;
    	height:28px;
    	background:0 0;
    	border-radius:4px;
    	text-align:center;
    	line-height:28px;
    	cursor:pointer;
    	transition:all .2s;
    	top:3px;
    	right:0
    }
    .popular-area-top .popular-area-nav button i {
    	color:#00d1c1;
    	font-size:12px
    }
    .popular-area-top .popular-area-nav button:hover {
    	background:#e1fffd
    }
    .popular-area-top .popular-area-nav button:nth-of-type(1) {
    	right:auto;
    	left:0
    }
    .popular-area-top .popular-area-nav p {
    	width:60px;
    	height:28px;
    	margin:0 auto;
    	line-height:28px;
    	text-align:center;
    	font-size:16px;
    	color:#c5c5c5;
    	font-weight:700
    }
    .popular-area-top .popular-area-nav p span {
    	color:#00d1c1
    }
    .popular-area-content {
    	height:342px
    }
    .popular-area-content .popular-content-l {
    	width:594px;
    	height:inherit;
    	margin-right:22px
    }
    .html-box img{
        display:inline-block!important;
    }
    /*首页动态大图结束*/
  • 【7B2主题美化】暗黑模式带开关适应B2Pro_4.1.2

    效果图

    教程

    • 头部位置增加按钮方法

    <strong>b2/Modules/Templates/Header.php 884行左右插入代码</strong>

    <div data-title="切换昼夜" class="user-tips"><button onclick="switchNightMode()"><i id="lmtdcn" class="lmtd bd-yewanshuimian"></i></button></div>

    后台b2主题-常规设置-头部HTML标签

    <script type="text/javascript" src="//at.alicdn.com/t/font_3133075_wsm2usco9v.js"></script> <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_3133075_wsm2usco9v.css" /> <script type="text/javascript" src="/pic/jquery.min.js"></script>

    自己的子主题style.css

    /*黑夜模式开始*/body.night .info-box,body.night .i-price{
      
        background: #3d3d3d;
    }
    body.night .infomation-list-top,body.night .info-list {
        border-bottom: 1px solid #535353;
    }
    .social-top .header-user {
        width: auto;
    }
    body.night .user-credit,body.night .user-money{
        color: #adb5bd!important;
    }
    body.night .topic-name-data b {
        color: #adb5bd;
    }
    body.night .po-topic-textarea .topic-content {
        color: #adb5bd;
    }
    body.night .message-content p {
        color: #adb5bd;
    }
    /*标题栏目*/body.night .comment-info span {
    color:#adb5bd
    }
    body.night .base-header h3 {
      color: #f0f0f0;
    }
    body.night .base-header h3::after {
      background: #ffc107;
    }
    body.night .base-header h3:before {
      background: #ffc107;
    }
    /*标题栏目结束*//*夜间登录背景*/body.night .login-box-img {
        background: linear-gradient(314deg,#946801 0%,#ffc107 100%);
    }
    /*夜间登录背景*/body.night .header-login-button button {
        border: 1px solid #333 !important;
        background: #333 !important;
    }
    body.night .login-bottom button {
        background: #ffc107 !important;
        border: 1px solid #ffc107 !important;
    }
    /*style*/@media screen and (max-width: 768px){
    body.night .menu-icon {
        background: #333;
        }
        
    body.night .login-button .b2-account-circle-line {
        color: #aaaeb3;
    }    
    body.night .top-menu-ul > li.depth-0:first-child > a {
        color: #adb5bd!important;
    }    
    body.night .social-top .header-banner-content .header-banner-left {
        width: 100%;
        height: 48px;
        border-top: 0px solid #eaeaea;
    }
    body.night .social-top .show-menu-box .header-logo {
        width: 100%;
        background: #292a2d;
        padding: 12px;
        top: 0;
        left: 0;
    }
    body.night .menu-icon .line-1,body.night .menu-icon .line-2,body.night .menu-icon .line-3 {
        background-color: #aaaeb3;
        }  
    body.night .login-button .b2-user {
        color: #aaaeb3;
        }    
    body.night .mobile-show {
        border: 1px solid rgba(255,255,255,0) !important;
        }
    body.night .mobile-footer-menu {
        background: #252829;
        }
    body.night .mobile-footer-center button {
        background: 0;
        border: 0;
        }
    body.night .show-menu-box .top-menu .top-menu-ul {
    border-left: 0px solid #272a2b;
        }
    body.night .top-menu ul li.depth-0 > a:after {
    background: #272a2b;
        }
    body.night .show-menu-box .top-menu .sub-menu {
    background: #272a2b;
        }
    body.night .show-menu-box .top-menu .sub-menu a {
    color: #909399;
        }
    body.night .logo-left .mobile-box,body.night .top-menu-ul>li.depth-0>a i.b2-arrow-down-s-line {
        background: #292a2d;
        }
    body.night .top-menu ul li.depth-0>a {
        background: #292a2d;
        }
    body.night .header-tools {
        background-image: url(https://www.xtuku.com/pic/night1.png);
        }
    body.night .close-button {
        color: #ddd!important;
    }
    body.night .ubanner-ctn h2 {
      font-size: 22px !important;
    }
    }
    body.night .ye {
      color: #ffc107;
    }
    body.night .poster {
      filter: sepia(0) grayscale(1) brightness(38%);
    }
    body.night .post-style-5 header h1 {
        background-repeat: repeat-x;
        background-position: 100% 100%;
        color: transparent;
        -webkit-font-smoothing: antialiased;
        -webkit-background-clip: text;
        -moz-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: 400;
    }
    body.night .ubanner-ctn h2 {
      text-align: center;
      color: #fff;
      font-size: 46px;
      font-weight: 600;
      margin-bottom: 65px;
      letter-spacing: 1px;
      text-shadow: 0 3px 6px rgba(0,0,0,0.2);
        background-position: 100% 100%;
        color: transparent;
        -webkit-font-smoothing: antialiased;
        -webkit-background-clip: text;
        -moz-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    /* 侧栏文章列表样式 */body.night .b2-widget-hot ul .widget-post:hover {
        cursor: pointer;
        background: linear-gradient(225.08deg,#2d3031 0%,#161819 96.09%);
        box-shadow: 1px 1px 2px #323638, -1px -1px 0px #292a2d;
    }
    body.night .widget-area .box h2 {
        color: #ffffff8f;
    }
    body.night .link-overlay:hover {
        color: #ffc107;
        text-decoration-line: none;
    }
    /* 侧栏文章列表样式 */body.night .post-next .post-pre-next-info:hover {
        cursor: pointer;
        background: linear-gradient(225.08deg,#161819 0%,#2d3031 96.09%);
        box-shadow: 1px 1px 2px #292a2d, -1px -1px 0px #292a2d;
    }
    body.night .post-pre .post-pre-next-info:hover {
        cursor: pointer;
        background: linear-gradient(225.08deg,#2d3031 0%,#161819 96.09%);
        box-shadow: 1px 1px 2px #292a2d, -1px -1px 0px #292a2d;
    }
    body.night .b2-menu-3 .sub-menu-0>li:hover>a, .b2-menu-3 .sub-menu-0 a:hover {
        background: linear-gradient(225.08deg,#262829 0%,#292a2d 96.09%);
    }
    body.night .widget ul li,body.night .aside-bar div>div+div{
        border-top:1px solid rgba(255,255,255,0)!important;
    }
    body.night .top-user-box-drop .avatar {
        border: #292a2d;
    }
    body.night .home-section-division,body.night .user-money,body.night .user-credit,body.night .site-terms,body.night .post-user-info,body.night .b2-audio-start-bar-box,body.night .post-tags-meat a .tag-img, body.night .content-hidden-info,body.night .widget-circle-info-desc,body.night .widget .recommended-widget li.picked a,body.night .comment-footer-tools .comment-vote-hidden button,body.night .comment-list button.text,body.night .user-sidebar-count li,body.night .following-info-desc,body.night .home-collection-image .collection-number.ar,body.night .insert-post,body.night .gold-page-list li:nth-child(odd),body.night .dmsg-content p,body.night .widget-new-header .ps1,body.night .widget-news-user,body.night .widget-new-header .ps a,body.night .pager-center,body.night .entry-content blockquote,body.night .post-content-footer .content-footer-poster button,body.night .collection-button,body.night .top-search .header-search-select,body.night .ds-textarea textarea,body.night input:focus,body.night .ds-item input,body.night .dmsg-textarea,body.night .desc textarea:focus,body.night .user-credit{
      background: #212425!important;
    color:#adb5bd
    }
    body.night .user-sidebar-count li,body.night .ds-textarea textarea {
        border: 5px solid #323335;
    }
    body.night .user-money,body.night .user-credit {
        text-shadow: 0px 0px 0px rgba(0,0,0,0);
        color: #fff;
    }
    body.night, body.night #body, body.night .page_navi a.current {
        background-color: #292a2d!important;
        color: #adb5bd!important;
    }
    body.night #sidebar, body.night .next-page a,body.night .com-form>.b2-radius {
        background-color: #292a2d;
        color: #888282;
    }
    body.night .home-section-division .home-division li h3 .go,body.night .bar-top,body.night .yarpp-related ol li:before {
        background: #ffc107;
    }
    body.night .home-section-division .home-division a:hover .item-thumb,body.night .home-section-division .home-division a:hover h3,body.night .tax-info-item .fliter-button:hover,body.night .pay-type li>button {
      color: #ffc107
    }
    body.night .home-section-division .home-division a {
        color: #525252;
    }
    @media (min-width:1024px) {
      body.night .home-section-division .home-division li.li_4 .item {
        background: #131313;
        color: #ffc107
      }
      body.night .home-section-division .home-division li.li_4 .item:hover {
        background: #ffc107;
        color: #fff
      }
    }
    body.night .lv-icon.user-lv i,body.night .custom-page-row.gold-row,body.night .modal.address-box .pay-box-content li.picked,body.night .pay-box-content li:hover,body.night .sah-catlist a,body.night .gujia .s-a-c-l h2,body.night .gujia .sah-name,body.night .gujia .sah-date,body.night .gujia .sah-r>div,body.night .gujia .sah-avatar,body.night .gujia .saf-z button,body.night .gujia .item-content::before,body.night .gujia .item-content::after {
        background-color: #292c2d;
    }
    body.night .bar-middle,body.night .bar-footer,body.night .aside-container .bar-user-info,body.night .bar-normal {
        box-shadow: -8px 0px 35px 0px rgba(0,0,0,0);
    }
    body.night .bar-user-info-row-title>a,body.night .related-posts .related-posts-title,body.night .post-3 .post-modules-top, .post-5 .post-modules-top,body.night .topic-vote-desc,body.night .home-collection-row-1,body.night .news-item ul,body.night .dmsg-list li {
        border-bottom: 1px solid rgba(255,255,255,0);
    }
    body.night .bar-mission .mission-today-list li,body.night .topic-type-menu,body.night .post-5 .load-more,body.night .post-5 .b2-pagenav,body.night .news-item+.news-item,body.night .news-item li+li,body.night .task-day-list li {
        border-top: 1px solid rgba(255,255,255,0);
    }
    body.night .related-posts .related-posts-item,body.night .top-search-select {
        border-right: 1px solid rgba(255,255,255,0);
    }
    body.night .next-jt i {
        background-color: rgba(255,255,255,0);
    }
    body.night .login-social-button-bottom,body.night .post-content-footer .content-footer-poster button {
        border: 1px solid rgba(0,0,0,0);
    }
    body.night .login-form-item input:focus {
        border-color: #ffc107;
    }
    body.night .login-eye .b2-eye-open,body.night .login-form-item input:focus + span,body.night .entry-content a:hover,body.night .tax-search button i,body.night .b2-audio-button {
        color: #ffc107;
    }
    body.night .user-w-logon:after {
        background-image: linear-gradient(0deg,#292a2d 0,rgb(29, 31, 32) 100%);
    }
    body.night .oauth-login-button {
        border-top: 1px dashed #444;
        border-bottom: 1px dashed #444;
        background: #292a2d;
    }
    body.night .comment-overlay {
        background-color: rgba(29, 31, 32, 0.91);
    }
    body.night .open-message{
        background: #292a2d!important;
        color: #adb5bd!important;
    }
    body.night .content-hidden-info {
        background-image: none;
    }
    body.night .post-5 .post-info h2::before,body.night .user-w-announcement li a::before,body.night .tax-fliter-hot .order-items a:hover {
        background-color: #ffc107;
    }
    /*
     * 无图文章列表浮动
     */body.night .post-5 .b2_gap {
        margin-top: 10px;
        margin-right: 0;
        background: #313131;
    }
    body.night .post-5 .b2_gap > li {
        background: #292a2d;
        margin: 0;
        transition: all .3s;
        border-right: 0;
        border-bottom: 1px solid #272a2b;
        border-left: 1px solid #272a2b;
        box-shadow: none;
    }
    body.night .post-5 .b2_gap > li:hover {
        -webkit-box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
        box-shadow: 0px 10px 20px #121415
        -webkit-transform: translateY(-3px);
        -ms-transform: translateY(-3px);
        transform: translateY(-3px);
        position: relative;
        z-index: 5;
    }
    body.night .b2_gap > li .item-in {
        transition: all .3s;
    }
    /** 文章卡片 */body.night .soft-area {
        border: 1px solid #292a2d;
        background: #292a2d;
    }
    body.night .post-style-6-meta {
        background-color: #212425;
        box-shadow: 0px 0px 2px #323638, inset 0px 2px 3px #151617;
    }
    body.night .post-style-6-meta .meta_left span {
        color: #fff;
    }
    body.night .post-style-6-top .info6fwq li {
        border-bottom: 1px solid #666;
        color: #aaaeb3;
    }
    body.night .site-content .soft-area .area-c .soft-detail h1 {
        color: #fff;
    }
    body.night .post-style-6-top .dz6fwq a {
        background: linear-gradient(90deg,#ffc107,#c58f11);
    }
    body.night .post-style-6-top .dz6fwq a:hover {
        background: linear-gradient(90deg,#e8a711,#ffc107);
    }
    body.night .post-style-6-top .dz6fwq a:hover {
        box-shadow: 0px 5px 10px #ffd77945;
    }
    body.night .post-style-6-top .info6fwq li:before {
        background: #ffc107;
    }
    /* h3搜索标题 */body.night .insearch {
        line-height: 1.5;
        background-image: linear-gradient(135deg,#232425,#292a2d),linear-gradient(-90deg,#1e1f20 0%,#696969 100%);
        /* border-bottom: .1rem solid; */    border-image: linear-gradient(-90deg, #1e2021, #ffc107);
      font-size: 22px !important;
      padding: 6px;
      filter: drop-shadow(-4px 0 0 #ffc107);
    }
    body.night .insearch:before {
        margin-right: 6pt !important;
        color: #ffc107 !important;
        content: "\e622" !important;
        right: 0;
    }
    body.night .entry-content>h3 {
        margin: 30px 0 30px 0 !important;
    }
    /** 下载卡片 */body.night .download-item {
        padding: 40px;
        margin-top: 60px;
        background: #2E3138;
        border: 1px solid #333740;
        box-sizing: border-box;
        box-shadow: inset -1px -1px 0px #292a2d, inset 1px 1px 4px #292a2d;
    }
    body.night .download-rights {
        background: linear-gradient(225.08deg, #535966 0%, #2E3138 96.09%);
        box-shadow: 0px 2px 8px rgba(26, 28, 31, 0.79652);
    }
    body.night .download-info {
        background: linear-gradient(225.08deg, #3d414a 0%, #2E3138 96.09%);
        box-shadow: 0px 2px 8px rgba(26, 28, 31, 0.79652);
    }
    body.night .download-info ul {
        display: flex;
        flex-flow: wrap;
        padding: 10px;
        margin: 0;
        list-style: none;
        background: #2e3138;
        box-shadow: 0px 0px 2px #535966, inset 0px 2px 3px #1A1C1F;
    }
    body.night .post-style-6 .download-current {
        background: #2e3138;
        box-shadow: 0px 0px 2px #535966, inset 0px 2px 3px #1A1C1F;
    }
    body.night .entry-content .button {
        border: 1px solid #313540;
        background: linear-gradient(225.87deg,#393d46 2.76%,#26282d 94.28%);
        font-weight: 600;
    }
    body.night .download-rights ul li {
        border-top: 1px dashed #2a2c31;
    }
    body.night .entry-content .button:hover {
        background: linear-gradient(225.87deg,#2a2d33 2.76%,#2a2c32 94.28%);
        color: #fff;
        box-shadow: 1px 1px 0px #141618, -1px -1px 1px #535966;
    }
    body.night .download-button-box a{
        color: #fff;
    }
    body.night .download-list.gujia .gujia-bg {
        background-color: #252627;
    }
    body.night .download-list.gujia .download-button-box div {
        background-color: #252627;
    }
    /*style end*//*夜间样式开始*/body.night #content .post p a, body.night .floor {
        color: #af8f77;
    }
    body.night a, body.night a:link, body.night a:visited,body.night .topic-comment-left textarea,body.night .name,body.night .item-title,body.night .nav-name,body.night .top-user-box-drop .top-user-info-box-count p,body.night .top-user-info-box-name h2,body.night .home-section-division .home-division li h3,body.night .bar-mission .user-w-qd-list-title p,body.night .login-title span,body.night .item-content .b2-out{
        color: #adb5bd;
    }
    body.night #comments form textarea, body.night #comments form input {
        background-color: #292a2d;
        color: #888282;
    }
    body.night #content .menufeng {
        border-bottom: 1px solid #989292;
    }
    body.night .author-edit-page .author-edit-list>li,body.night .vip-top,body.night .collection-info,body.night .stream-article,body.night .stream-area .b2-pd {
        border-bottom: 1px solid #232627;
    }
    body.night .vip-allow.allow {
        color: #676c6f;
    }
    body.night #comments form textarea, body.night #comments form input, body.night #shangerweima {
        border: 1px solid #989292;
    }
    body.night .topic-comment-list,body.night .topic-comment-list-header,body.night .topic-lv1+.topic-lv1,body.night .topic-comment-list-footer,body.night .user-panel .avatar,body.night .com-form-textarea,body.night .ds-item,body.night .pay-type li>button {
        border: 1px solid #242627;
    color:#adb5bd
    }
    body.night #nav .menu ul{
        background: #292a2d;
    }
    body.night .site,body.night .widget-comment-contnet,body.night .circle-desc,body.night .po-topic-textarea textarea:first-child,body.night .post-list-cats a span,body.night .top-style-blur,body.night .shop_bg,body.night .news-header,body.night .news-item-header span.new-tag,body.night .news-item-header span,body.night .news-header .banner .banner-text .btn,body.night .com-form-textarea textarea,body.night .content-excerpt,body.night .shop-single-data-count button,body.night .shop-single-data li.shop-single-data-price,body.night .shop-single-data-count input,body.night .single-document-footer,body.night .document-cat-item:hover,body.night .content-ds,body.night .message-content p.comment span,body.night .topic-comment-form,body.night .topic-child-list ul,body.night .topic-footer-left button,body.night .topic-meta-more-box ul,body.night .topic-loading-more-button,body.night .entry-content p > code,body.night .post-tags-meat a,body.night .b2-light-dark-outside,body.night .filter-items a,body.night .topic-image-light,body.night .user-w-rw,body.night .user-credit,body.night .vip-count ul li .vip-in,body.night .mission-tk,body.night .top-user-box-drop.show,body.night .top-user-info-box .user-w-gold a i,body.night .tax-fliter-hot,body.night .bar-user-info-row .user-w-gold div,body.night .mission-page-list li:nth-child(even),body.night .modal-content{
        background:#292a2d;
    color:#adb5bd
    }
    body.night .bar-normal,body.night .box,body.night .span4,body.night .footer-fav,body.night .post-5 .b2_gap,body.night .news-item-header span::after,body.night .tbox,body.night .buy-resout-box,body.night .news-item-header b,body.night .sub-menu,body.night .topic-comment-form.show textarea,body.night .content-hidden-before i,body.night .content-hidden-end span,body.night .tax-fliter-cat,body.night .tax-search input,body.night .bar-item-desc,body.night .boxt,body.night .nav-detail-portfolio-wrapper,body.night .author-page-right,body.night .po-topic-box-tips{
        background:#323335;
    }
    body.night .bar-footer,body.night .aside-container .bar-user-info,body.night .bar-user-info-row,body.night .user-w-tj,body.night img.avatar,body.night .topic-card-box li,body.night .topic-video-box li>div video,body.night .topic-guess-box,body.night .widget .recommended-widget li a:hover,body.night .collection-posts li span,body.night .dmsg-list li:hover,body.night .mask-wrapper {
        background-color: #323335;
    color:#adb5bd
    }
    body.night .button,body.night button {
        background: #292a2d;
        /*border: 1px solid #ffc107;*/}
    body.night button.empty,body.night .button.empty {
        background: #333;
    }
    body.night .search-button-action,body.night .login-eye.button,body.night .my-circle-list>div>button,body.night .topic-drop>button,body.night .tax-search button,body.night .change-theme button,body.night .po-post-icons button,body.night .po-close-button button,body.night .gold-list-row-5,body.night .gold-list-row-1,body.night .gold-list-row-2,body.night .gold-list-row-3,body.night .gold-list-row-4,body.night .gold-page-list,body.night .site-footer .widget-title,body.night button,body.night .po-topic-top-right button,body.night .topic-type-menu>ul li button,body.night .po-ask button,body.night .topic-footer-right button,body.night .topic-author-info-right button,body.night .mfp-iframe-holder .mfp-close,body.night .tax-info-item .fliter-button,body.night .login-box-content .login-social-button-bottom a {
        background: 0 0;
        border: 0;
    }
    body.night button.empty,body.night .button.empty,body.night li.current-menu-item > a,body.night .topic-comment-content:hover button,body.night .top-menu-hide:hover .more,body.night .header .top-menu ul li.depth-0:hover > a .b2-jt-block-down,body.night button.text,body.night .entry-content a.button.empty,body.night .entry-content a.button.text,body.night .user-sidebar-info.active p {
        color: #ffc107;
    }
    .b2-light, .newsflashes-nav-in ul li.current-menu-item a {
        background-color: #ffc10712;
    }
    body.night .user-w-rw,body.night .user-credit{
        text-shadow:none;
    }
    body.night .user-w-qd-list-title{
       background-color:rgb(0, 88, 255,0.66); 
    }
    body.night .user-w-rw-bg,body.night .po-topic-button,body.night .topic-type-menu button.picked,body.night .btn-orange,boby.night .user-w-announcement li a::before{
        background-color: #ffc107;
        color: #fff;
    }
    body.night .b2-color,boby.night .po-topic-top-right .picked,body.night .top-user-box-drop li a i{
        color: #ffc107!important
    }
    body.night #public .topic-type-menu {
        background: rgba(41, 48, 66, 0.4);
    }
    body.night .wenzi,body.night .news-item-content p,body.night .news-header .banner .banner-text h4,body.night .topic-footer-right button,body.night .user-w-tj span {
        color: #9a9a9a;
    }
    body.night .gdd-quick-link-buy-vip__hover-block,body.night .gdd-quick-link-buy-vip__popover--btn,body.night .gdd-quick-link-buy-vip,body.night .gdd-quick-link-buy-vip__popover {
        background-color: #ffc107;
        color: #fff;
    }
    body.night .widget-comment-contnet.jt:before, body.night .widget-comment-contnet.jt:after,body.night #public .my-circle-list button.picked:before,body.night #public .my-circle-list button.picked:after {
        border-bottom-color: #202634;
    }
    body.night .shop-box-price {
        background: #242a38;
        border-top:none;
        border-bottom: none;
    }
    body.night .post-pay-type .post-pay-type-icon{
        color: #3e74a3;
    }
    body.night .comment-list button.text,body.night .top-search .header-search-select {
        border: 1px solid #212425;
    }
    body.night .b2-widget-title h2, .widget > h2{
        color: inherit;
    }
    body.night .topic-child-list li + li {
        border-top: 1px dashed #293042;
    }
    body.night .topic-comments:before{
        border-color: transparent transparent #202634;
    }
    body.night .widget-uisdc-helper .uisdc-helper-title {
        color: #ffc107;
        background: #222425;
    }
    body.night .custom-page-row.gold-row+.custom-page-row.gold-row {
        border-left: 10px solid #292a2d;
    }
    body.night .download-thumb::before {
        background: -webkit-radial-gradient(right top, ellipse cover, rgba(250, 250, 250, 0) 8%,rgb(41, 48, 66) 73%);
        background: radial-gradient(right top, ellipse cover, rgba(250, 250, 250, 0) 8%,rgb(41, 48, 66) 73%);
    }
    body.night .home_row,body.night .post-modules-top,body.night .post-5{
        background: rgba(0,0,0,0)!important;
    }
    body.night .b2-widget-comment,body.night .b2-widget-products,body.night .b2-widget-hot,body.night .po-topic-textarea,body.night .com-form-textarea textarea,body.night .topic-comment-list > ul,body.night .topic-comment-avatar,body.night .circle-info-left img,body.night .left-item img,body.night .logo-wrapper,body.night .mission-page-list ul{
        border: 1px solid #202634;
    color:#adb5bd
    }
    body.night .box-header,body.night .site-title,body.night .shop-single-action-right .favorite-button,body.night .tax-info-item .fliter-button {
        color: #fff;
    }
    body.night .comment .comment-item,body.night .post-5 ul.b2_gap > li,body.night .user-w-tj,body.night .user-w-rw,body.night .document-row + .document-row,body.night .has_children .sub-menu,body.night .post-tags-meat,body.night .none-comment,body.night .topic-comments,body.night #filter-top ul li + li,body.night .b2-b-t,body.night .circle-widget-button,body.night .list-footer,body.night .vip-faq-list + .vip-faq-list,body.night .custom-page-row + .custom-page-row,body.night .no-request,body.night .request-box li{
        border-top: 1px solid #212425!important;
    }
    body.night .post-user-info,body.night .po-topic-textarea textarea:first-child,body.night .my-circle-list,body.night .user-w-rw,body.night .shop-single-attr-title,body.night .single-bottom h3,body.night .shop-single-data li,body.night .dmsg-header,body.night .message-list li,body.night .box-header,body.night .author-links,body.night .custom-page-title,body.night .entry-header{
        border-bottom: 1px solid rgba(114, 114, 114, 0.1);
    }
    body.night .my-circle-list > div + div {
        border-left: 1px solid #202634;
    }
    body.night .post-5 ul.b2_gap > li {
        border-right: 1px solid #202634;
    }
    body.night .shop-single-img-box,body.night .shop-single-data-count button,body.night .shop-single-data-count input,body.night .content-ds,body.night .post-tags-meat a,body.night .po-topic-tools-right button,body.night .widget-mission-footer a {
        border: none;
    }
    body.night .post-3 .post-3-li .item-in:hover {
        background-color: #212425;
        color: #ff6800;
    }
    body.night .entry-content,body.night .comment-content-text p,body.night .shop-single-data-count input,body.night .news-header .banner .banner-text h2,body.night .message-content p.comment span{
        color: #adb5bd;
    }
    body.night .comment-list .children article .comment-item {
        border: none;
    }
    body.night .block-logo,body.night .banner-img {
        display: none;
    }
    body.night .news-header .banner{
        display: block;
        margin: 50px 0;
    }
    body.night .news-header .banner .banner-text{
        width: auto;
    }
    .logo .light-logo{
        display: none;
    }
    body.night .light-logo {
        display: block;
    }
    body.night .entry-content > hr {
        background-image: -webkit-linear-gradient(left, #202634, #8c8b8b, #202634);
        background-image: -moz-linear-gradient(left, #202634, #8c8b8b, #202634);
        background-image: -ms-linear-gradient(left, #202634, #8c8b8b, #202634);
        background-image: -o-linear-gradient(left, #202634, #8c8b8b, #202634);
    }
    body.night .shop-single-data li.shop-single-data-price{
        background-image:none;
    }
    body.night .content-hidden-info {
        border: 1px dashed rgba(178, 186, 194, 0.17);
    }
    body.night .buy-vip__hover-block,body.night .buy-vip__popover,body.night .buy-vip__popover--btn{
        background-color: #0058ff!important;
    }
    body.night .buy-vip__popover--btn,body.night .header-user .iconday,body.night .b2-widget-hot-circle .b2-widget-title button{
        color: #fff;
    }
    body.night .buy-vip__popover--desc{
        color:#0058ff ;
    }
    body.night .modal-content {
        background-image: url(https://www.xtuku.com/pic/night1.png);
        background-repeat: no-repeat;
        background-size: 100%;
    }
    body.night .top-user-info-box {
        background-image: url(https://www.xtuku.com/pic/night2.jpg);
    }
    body.night .header-search-select .select,body.night .header-search-select a:hover {
        background: #272a2b;
    }
    body.night .b2-menu-3 a:after{
    background: linear-gradient(225.08deg,#292a2d 20%,#ffc107 90.09%);
    }
    /*加载中背景*/body.night .gujia .bg,body.night .widget .widget-gujia-hot-circle .widget-circle-info h2,body.night .widget-gujia-hot-circle .widget-circle-icon,body.night .widget-gujia-hot-circle .widget-circle-meta span,body.night .topic-guess-box,body.night .post-thumb,body.night .widget-gujia-user .user-w-announcement>div,body.night .mission-gujia .user-w-qd>div,body.night .mission-gujia .user-mission-info-left,body.night .mission-gujia .avatar-parent,body.night .dmsg-self .my-dmsg-content,body.night .my-dmsg-content,body.night table td {
        background: #272a2b;
    }
    body.night .preloader {
        background-color: rgb(0 0 0 / 80%);
    }
    body.night .preloader-loding {
        color: #ffc107;
    }
    body.night .preloader-lod,body.night .large-square {
        background: #ffc107;
    }
    body.night .header-banner{
        background-color: #292a2d;
    }
    body.night .social-top .header{
        border-top: 1px solid #292a2d;
    margin-top: -2px;
    }
    /*灰白色字体*/body.night .change-theme button i,body.night .button.empty,body.night .home-first .hf-widget,body.night .home-first .hf-widget .hf-widget-title a,body.night .ceo-cat-switcher h5,body.night #container-box-1,body.night .searchs input[type="text"],body.night .bar-item i,body.night .site-footer,body.night .item-in.box.b2-radius:hover,body.night .u-backgroundColorWhite,body.night .authorCard--description,body.night .authorCard--meta,body.night .authorCard--title,body.night .button, body.night button,body.night .vip-faq .vip-faq-list h2,body.night .vip-faq .vip-faq-list p,body.night .post-list-item:hover .post-list-meta-box,body.night .insert-post h2,body.night .file-down h2,body.night .content-ds-count{
        color: #adb5bd!important;
    }
    /*背景色*/body.night .home-first .hf-widget,body.night .home-first .hf-widget-4 .hf-widget-content ul,body.night .site-footer,body.night .item-in.box.b2-radius:hover,body.night li.b2-widget-box.widget-post.widget-post-small:hover,body.night .u-backgroundColorWhite,body.night .w-a-count,body.night .write-select-row-top textarea,body.night .login-form-item input,body.night .forget-pass-info,body.night .vip-faq .vip-faq-list p,body.night .vip-faq .vip-faq-list{
        background-color: #323335!important;
    color:#adb5bd
    }
    /*鼠标移上去字体变白*/body.night .button.empty:hover{
        color: #FFF!important;
        transition: all .3s;
    }
    /*夜间圆角*/body.night #author .author-page-right{
        border-radius: 20px!important;
    }
    body.night .home-first .hf-widget{
        border: 1px solid rgba(114, 114, 114, 0.1);
    }
    body.night .home-first .hf-widget .hf-widget-title,body.night .post-3 .post-3-li .item-in{
        border-bottom: 1px solid rgba(114, 114, 114, 0.1);
    }
    body.night .index-header,body.night .single-top-html,body.night #html-box-ad{
        opacity: 0.5;
    }
    body.night img{
        opacity: 0.7;
    }
    body.night .login-form-item input:focus + span:after,body.night .login-form-item input[class="active"] + span:after,body.night .login-form-item input:valid + span:after,body.night .po-ask button span{
        background: #292a2d!important;
    }
    body.night .recaptcha-button{
        border-top: 1px solid #292a2d;
    }
    body.night .recaptcha-button .recaptcha-send{
        border-left: 0;
    }
    body.night .vip-footer .vip-faq{
        background: none!important;
    }
    body.night textarea.topic-title{
        border-radius: 20px 20px 0 0;
    }
    body.night code,body.night .entry-content p > code{
        color: #ff3c98;
        background-color: rgba(253,153,153,.2)!important;
        font-weight: 600;
    }
    body.night .common-button{
        color: #FFF!important;
    }
    body.night #banner_wave_1 {
        width: auto;
        height: 65px;
        _filter: alpha(opacity=80);
    display: none;
        position: absolute;
        bottom: 0;
        width: 400%;
        left: -236px;
        z-index: 1;
        opacity: 1;
        transiton-property: opacity, bottom;
        transition-duration: .4s, .4s;
        animation-name: move2;
        animation-duration: 240s;
        animation-fill-mode: backwards;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
        top: 537px;
    }
    body.night #banner_wave_2 {
        width: auto;
        height: 65px;
        _filter: alpha(opacity=80);
    display: none;
        position: absolute;
        bottom: 0;
        width: 400%;
        left: -236px;
        z-index: 1;
        opacity: 1;
        transiton-property: opacity, bottom;
        transition-duration: .4s, .4s;
        animation-name: move2;
        animation-duration: 240s;
        animation-fill-mode: backwards;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
        top: 537px;
    }
    body.night .parallax{
    display:none
    }
    body.night .user-tools .menu-new{
        font-size: 12px!important;
        background:#FF3355;
        color: #fff!important;
        position: absolute;
        right: 12px;
        line-height: 1;
        padding: 2px 4px;
        border-radius: 2px;
        margin-top: 2px;
        transform-origin:top top;
        transform: perspective(1px) scale(.74);
        font-style:inherit
    }
    body.night .write-thumb label {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    background:#fff;
        color: rgba(26,26,26,.2);
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        cursor: pointer;
        flex-flow: column;
    }
    /*黑夜模式结束*/

    子主题的child.js加入代码

    /*夜间模式开始*/(function(){
        if(document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") === ''){
            if(new Date().getHours() > 22 || new Date().getHours() < 6){
                document.body.classList.add('night');
                document.cookie = "night=1;path=/";
                    $(lmtdcn).removeClass("bd-taiyang-");
                $(lmtdcn).addClass("bd-yewanshuimian");
               
            }else{
                document.body.classList.remove('night');
                  $(lmtdcn).removeClass("bd-yewanshuimian");
                $(lmtdcn).addClass("bd-taiyang-");
                document.cookie = "night=0;path=/";
              
            }
        }else{
            var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0';
        if(night == '0'){
            document.body.classList.remove('night');
              $(lmtdcn).removeClass("bd-yewanshuimian");
                $(lmtdcn).addClass("bd-taiyang-");
              
        }else if(night == '1'){
            document.body.classList.add('night');
                $(lmtdcn).removeClass("bd-taiyang-");
                $(lmtdcn).addClass("bd-yewanshuimian");
             
            }
        }
        })();
        function switchNightMode(){
            var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0';
            if(night == '0'){
                document.body.classList.add('night');
                $(lmtdcn).removeClass("bd-taiyang-");
                $(lmtdcn).addClass("bd-yewanshuimian");
                document.cookie = "night=1;path=/"
              
            }else{
                document.body.classList.remove('night');
                $(lmtdcn).removeClass("bd-yewanshuimian");
                $(lmtdcn).addClass("bd-taiyang-");
                document.cookie = "night=0;path=/"
                
            }
        }
        // 页面宽度按钮
        (function(){
        if(document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") === ''){
            if(new Date().getHours() > 22 || new Date().getHours() < 6){
                document.body.classList.add('night');
                    $(lmtdcn).removeClass("bd-taiyang-");
                $(lmtdcn).addClass("bd-yewanshuimian");
                document.cookie = "night=1;path=/";
            }else{
                document.body.classList.remove('night');
                  $(lmtdcn).removeClass("bd-yewanshuimian");
                $(lmtdcn).addClass("bd-taiyang-");
                document.cookie = "night=0;path=/";
            }
        }else{
            var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0';
        if(night == '0'){
            document.body.classList.remove('night');
              $(lmtdcn).removeClass("bd-yewanshuimian");
                $(lmtdcn).addClass("bd-taiyang-");
        }else if(night == '1'){
            document.body.classList.add('night');
                $(lmtdcn).removeClass("bd-taiyang-");
                $(lmtdcn).addClass("bd-yewanshuimian");
            }
        }
        })();
        function switchwidth(){
            var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0';
            if(night == '0'){
                document.body.classList.add('night');
                    $(lmtdcn).removeClass("bd-taiyang-");
                $(lmtdcn).addClass("bd-yewanshuimian");
                document.cookie = "night=1;path=/"
            }else{
                document.body.classList.remove('night');
                  $(lmtdcn).removeClass("bd-yewanshuimian");
                $(lmtdcn).addClass("bd-taiyang-");
                document.cookie = "night=0;path=/"
            }
        }
     
    /*夜间模式结束*/

    有的用户浏览器闪白问题修改B2-header.php第16行

    <body <?php body_class(b2_get_option('template_top','top_type')); ?>>

    替换为

    <?php
    if ($_COOKIE['night']==1)
    $fssp="night";
    else 
    $fssp="";
    ?>
    <body <?php body_class($fssp); ?><?php body_class(b2_get_option('template_top','top_type')); ?>>

    最后在网站根目录放入pic文件夹

  • 超萌的二次元动漫个人主页源码

    效果图

    超萌的二次元动漫个人主页源码纯html5网页模板+自适应,简约大气非常的萌~右键记事本即可修改里面的内容,上传服务器就能打开

  • 超好看的二次元主页[附美化教程]

    大家好,我是李初一,本次给大家介绍一款我个人十分喜欢的二次元个人主页包括我个人进行的一些美化思路,推荐大家自己手动加入禁用右键的代码,没有右键功能会比较有高级感一点

    这次给大家带来的是这样一款的二次元风格个人主页 背景为幻灯片或视频
    演示地址:https://dg.zyw.one/
    演示地址我做了简单的对接,对接了OneTool多平台助手所以会多三个按钮以及小部分对接后的数据,本篇文章将会绕过OneTool后台对接

    [b2_file link=”https://lichuyi.lanzoum.com/ifwcS0g1ew1a” name=”二次元个人主页” pass=”” code=””]
    原本是做给扒站大哥的,但是我网站做了部分处理,扒站会缺失部分代码,大家无需在意直接下载即可


    正文

    下载完源码,将源码解压至桌面,这里建议大家先创建一个文件夹,解压至文件夹内

    一共34个文件,900k左右的内存,双击index.html查看一下源码首次加载会比较慢一点

    大家先看一下页面样式以及部分细节处

    图片[4]-超好看的二次元主页[美化教程]-初一资源网

    页面左上角logo很丑,引导页三个字很突兀,全局性的异次元logo都很丑,生日倒计时不会动

    首先移除logo,不需要移除的小伙伴可以在images文件夹内替换图片为自己的

    使用NotePad++或Visual Studio Code打开index.html(两款软件都是编辑器,我个人比较喜欢notepad可能是用习惯了)

    图片[5]-超好看的二次元主页[美化教程]-初一资源网

    这里使用Visual Studio Code给大家教学,打开文件先修改文字信息链接啥的,这一点本文不做教学了,与美化无关

    移除页内所有logo(不需要的爷们儿可以跳过这里)

    Ctrl+F搜索logo

    图片[6]-超好看的二次元主页[美化教程]-初一资源网

    把你所看到的带logo的代码全部注释掉或者删掉

    移除以后站点的细节方面看起来就会比较舒适了

    修复生日计时

    图片[7]-超好看的二次元主页[美化教程]-初一资源网

    这里永远是373天从来都不会动,初一的演示页都搭建了一个月了都没变化过

    本以为是源码问题,结果换了好几个版本都不会动,也找不到作者GitHub开源的地址

    所以这里教大家手动修复/修改一下

    首先,倒计时我是不会啦,但是让他计时还是很简单的

    我们仅需引入JS

    <!--运行时长JS - 初一资源网WWW.ZYW.ONE-->
        <script>
        var now = new Date(); 
        function createtime() { 
                              //月、日、年,小时、分、秒
            var grt= new Date("11/15/2022 00:00:00");//此处修改你的建站时间或者网站上线时间 
            now.setTime(now.getTime()+250); 
            days = (now - grt ) / 1000 / 60 / 60 / 24; dnum = Math.floor(days); 
            hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum); hnum = Math.floor(hours); 
            if(String(hnum).length ==1 ){hnum = "0" + hnum;} minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum); 
            mnum = Math.floor(minutes); if(String(mnum).length ==1 ){mnum = "0" + mnum;} 
            seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum); 
            snum = Math.round(seconds); 
            <!-- 加判断条件避免出现60秒的情况 -->
      if(snum==60){
          snum=0;
        }
    
      if(String(snum).length ==1 ){snum = "0" + snum;} 
            document.getElementById("timeDate").innerHTML = " "+dnum+"  "; //天数
            document.getElementById("times").innerHTML = hnum + "  "; //小时
            document.getElementById("times2").innerHTML = mnum + "  "; //分
        } 
    setInterval("createtime()",250);
    </script>

    注意哦,这里是在HTML里引入JS而不是创建JS文件,如果要用文件形式大家自己修改调整一下即可

    图片[8]-超好看的二次元主页[美化教程]-初一资源网

    位于</head>之前或者</body>之前都可以,看你个人喜好

    然后在插入代码到下面这三个位置替换那几个数字

    图片[9]-超好看的二次元主页[美化教程]-初一资源网
    <span id="times">载入时...</span>
    <span id="timeDate">载入天数...</span>
    <span id="times2">载入分...</span>

    如果没有生效就是代码书写的问题则将这里全代码替换为初一的

    <div class="section page-when page page-cent" id="s-when">
                    <section class="content">
                        <div class="clock clock-countdown">
                <div class="site-config" data-date="7/18/2021 00:00:00" data-date-timezone="+0"></div>
                <header class="header">
                  ? Zy<strong> 初一云已完美运营 </strong> ?
                </header>
                            <div class="elem-left">
                                <div class="digit hours"><span id="times">载入时...</span></div>
                                <div class="text">时</div>
                            </div>            
                            <div class="elem-center">
                  <!-- Optional text at top or image logo -->
                  <span class="text top">WWW.ZYW.ONE</span>
                  <!-- Optional logo at top -->
                                <div class="digit days"><span id="timeDate">载入天数...</span></div>
                                <div class="text">日</div>
                            </div>
                            <div class=" elem-right">
                                <div class="digit minutes"><span id="times2">载入分...</span></div>
                                <div class="text">分</div>
                            </div>
    图片[10]-超好看的二次元主页[美化教程]-初一资源网

    随后便得到了这样的效果

    修改英文字体样式

    先搜索style-font1

    图片[11]-超好看的二次元主页[美化教程]-初一资源网

    查看其上下有没有类似的代码,如果有则替换成下方的,没有就加上

    <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet" type="text/css">

    字体为谷歌字体,如不显示多刷新几次即可,国内服务器估计是挺悬的可以下载这个字体进行本地引用

    [b2_file link=”https://lichuyi.lanzoum.com/ibHlb0g3ri2h” name=”谷歌字体” pass=”” code=””]

    然后打开style-font1.css

    图片[12]-超好看的二次元主页[美化教程]-初一资源网

    将这里替换成Pacifico

    保存刷新查看就得到了好看的英文字体啦

    图片[13]-超好看的二次元主页[美化教程]-初一资源网

    首页标语发光

    首先在文件夹更目录创建style.css并写入以下代码

        /* 初始化 */    margin: 0;
        padding: 0;
    }
    body{
        /* 100%窗口高度 */    min-height: 100vh;
        /* 弹性布局 水平+垂直居中 */    display: flex;
        justify-content: center;
        align-items: center;
        background-color: #06252e;
    }
    .container{
        /* 投影效果 */    -webkit-box-reflect: below 1px linear-gradient(transparent,rgba(0,0,0,0.2));
    }
    h2{
        color: #fff;
        font-size: 96px;
        /* 字间距 */    letter-spacing: 15px;
        /* 转大写 */    text-transform: uppercase;
        text-align: center;
        line-height: 76px;
        outline: none;
        /* 自定义属性--c,可通过var函数对其调用 */    --c:lightseagreen;
        /* 调用自定义属性--c,设置文字阴影(发光效果) */    text-shadow: 0 0 10px var(--c),
        0 0 20px var(--c),
        0 0 40px var(--c),
        0 0 80px var(--c),
        0 0 160px var(--c);
        /* 执行动画:动画名 时长 线性的 无限次播放 */    animation: animate 5s linear infinite;
    }
    
    /* 定义动画 */@keyframes animate {
        to{
            /* 色相旋转滤镜(设置度数可改变颜色) */        filter: hue-rotate(360deg);
        }
    }

    然后再HTML内加入

    <link rel="stylesheet" href="style.css">

    保存刷新即可

    图片[14]-超好看的二次元主页[美化教程]-初一资源网
  • 萌翻少女心的发光果冻泡泡

    效果图

    萌翻少女,,,!初一觉得不大可能,萌翻一片少男倒是挺有可能,可用作与跳转页以及网站预加载动画

    HTML

    <html>
    
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    
        <title>萌翻少女心的发光果冻泡泡</title>
        <link rel="stylesheet" href="style.css">
    </head>
    
    <body>
        <div class="container">
            <div class="bubble"></div>
            <div class="shadow"></div>
        </div>
    </body>
    
    </html>

    CSS

    *{
        margin: 0;
        padding: 0;
    }
    body{
        /* 100%窗口高度 */    height: 100vh;
        /* 弹性布局 居中显示 */    display: flex;
        justify-content: center;
        align-items: center;
        /* 渐变背景 */    background: linear-gradient(150deg,#d299c2,#fef9d7);
        /* 溢出隐藏 */    overflow: hidden;
    }
    .container{
        width: 200px;
        height: 200px;
        /* 相对定位 */    position: relative;
    }
    /* 泡泡 */.bubble{
        width: 100%;
        height: 100%;
        /* 径向渐变 */    background: radial-gradient(circle at 75% 30%,#fff 5px,#ff21c0 8%,#5b5b5b 60%,#ff21c0 100%);
        border-radius: 50%;
        /* 阴影 */    box-shadow: inset 0 0 20px #fff,
            inset 10px 0 46px #eaf5fc,
            inset 80px 0 60px #efcde6,
            inset -20px -60px 100px #f9f6de,
            inset 0 50px 140px #f9f6de,
            0 0 90px #fff;
        /* 执行动画:动画名 时长 加速后减速 无限次播放 */    animation: bubble 4s ease-in-out infinite;
    }
    .shadow{
        background-color: rgba(0,0,0,0.15);
        width: 150px;
        height: 40px;
        border-radius: 50%;
        /* 绝对定位 */    position: absolute;
        left: 50%;
        margin-left: -75px;
        bottom: -100px;
        /* 一点点模糊效果 */    filter: blur(1px);
        /* 执行动画:动画名 时长 加速后减速 无限次播放 */    animation: shadow 4s ease-in-out infinite;
    }
    
    /* 定义动画 *//* 泡泡浮动动画 */@keyframes bubble {
        0%,100%{
            transform: translateY(0);
        }
        50%{
            transform: translateY(-80px);
        }
    }
    /* 投影动画 */@keyframes shadow {
        0%,100%{
            transform: scale(0.5);
        }
        50%{
            transform: scale(1);
        }
    }
  • 手把手教你如何制作个人主页

    今天通过别的资源网了解到森鹿语,这个站点每一个美化都恰到好处,没有像别的站点一样花里胡哨,让人的第一印象十分的舒适,既然来到了这里,那我也留下点什么东西吧,证明这里也是有我的脚印的(●’◡’●)

    这里教大家如何使用HTML、CSS、JS三个文件制作一款简洁的个人主页

    首先我们在我们电脑的桌面创建一个记事本文件,输入下面的代码,并重命名为index.html

    <!-- Created By 李初一 -->
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>李初一网络科技工作室</title>
        <link rel="stylesheet" href="style.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
        <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.11/typed.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css"/>
    </head>
    <body>
        <div class="scroll-up-btn">
            <i class="fas fa-angle-up"></i>
        </div>
        <nav class="navbar">
            <div class="max-width">
                <div class="logo"><a href="https://alacg.cc">Zy_<span>李初一</span></a></div>
                <ul class="menu">
                    <li><a href="#home" class="menu-btn">首页</a></li>
                    <li><a href="#about" class="menu-btn">关于</a></li>
                    <li><a href="#services" class="menu-btn">服务</a></li>
                    <li><a href="#skills" class="menu-btn">技能</a></li>
                    <li><a href="#teams" class="menu-btn">团队</a></li>
                    <li><a href="#contact" class="menu-btn">联系</a></li>
                </ul>
                <div class="menu-btn">
                    <i class="fas fa-bars"></i>
                </div>
            </div>
        </nav>
    
        <!-- home section start -->
        <section class="home" id="home">
            <div class="max-width">
                <div class="home-content">
                    <div class="text-1">你好, 我的名字是</div>
                    <div class="text-2">李初一</div>
                    <div class="text-3">我是一个 <span class="typing"></span></div>
                    <a href="https://t.me/Zy_Lcy">Telegram联系</a>
                </div>
            </div>
        </section>
    
        <!-- about section start -->
        <section class="about" id="about">
            <div class="max-width">
                <h2 class="title">About me</h2>
                <div class="about-content">
                    <div class="column left">
                        <img src="img/login.jpg" alt="">
                    </div>
                    <div class="column right">
                        <div class="text">李初一 Is <span class="typing-2"></span></div>
                        <p>不久前还只是一个失业农民工.现在还只是一只喜欢动漫和文学的学生党.不久以后将是又一个人生迷茫的旅行者.</p>
                        <a href="https://www.zyw.one">前往博客</a>
                    </div>
                </div>
            </div>
        </section>
    
        <!-- services section start -->
        <section class="services" id="services">
            <div class="max-width">
                <h2 class="title">我的专长</h2>
                <div class="serv-content">
                    <div class="card">
                        <div class="box">
                            <i class="fas fa-paint-brush"></i>
                            <div class="text">Web 设计</div>
                            <p>极简美学,美化你的站点</p>
                        </div>
                    </div>
                    <div class="card">
                        <div class="box">
                            <i class="fas fa-chart-line"></i>
                            <div class="text">广告</div>
                            <p>为各大站长提供有效帮助</p>
                        </div>
                    </div>
                    <div class="card">
                        <div class="box">
                            <i class="fas fa-code"></i>
                            <div class="text">应用程序设计</div>
                            <p>经验丰富,定制属于你的程序</p>
                        </div>
                    </div>
                   </div>
                </div>
            </div>
        </section>
    
        <!-- skills section start -->
        <section class="skills" id="skills">
            <div class="max-width">
                <h2 class="title">技能</h2>
                <div class="skills-content">
                    <div class="column left">
                        <div class="text">About Skill</div>
                        <p>2019,第一次接触是C/C++,在拥挤的实验室</p>
    
                        <p>2020,三月份在寝室迷上了网络游戏</p>
    
                        <p>九月份开始学习到Java</p>
    
                        <p>2021,年初的时候摸了摸Android,觉得稀奇有趣</p>
    
                        <p>剩下的月份我在看JavaWeb</p>
    
                        <p>2022,接触到WordPress,兴趣开始转到前端和脚本语言</p>
    
                        <p>上半年插科打诨</p>
    
                        <p>下半年开始学习H5,CSS3,JS</p>
    
                        <p>现在正在学习前端工程化技术</p>
    
                        <p>喜欢UI,交互设计,觉得UED是我坚持精确1个像素的动力</p>
    
                        <p>而未来...</p>
    
                        <p>想成为一名全栈工程师</p>
                        <a href="https://www.zyw.one">了解更多</a>
                    </div>
                    <div class="column right">
                        <div class="bars">
                            <div class="info">
                                <span>HTML</span>
                                <span>90%</span>
                            </div>
                            <div class="line html"></div>
                        </div>
                        <div class="bars">
                            <div class="info">
                                <span>CSS</span>
                                <span>60%</span>
                            </div>
                            <div class="line css"></div>
                        </div>
                        <div class="bars">
                            <div class="info">
                                <span>JavaScript</span>
                                <span>80%</span>
                            </div>
                            <div class="line js"></div>
                        </div>
                        <div class="bars">
                            <div class="info">
                                <span>PHP</span>
                                <span>50%</span>
                            </div>
                            <div class="line php"></div>
                        </div>
                        <div class="bars">
                            <div class="info">
                                <span>MySQL</span>
                                <span>70%</span>
                            </div>
                            <div class="line mysql"></div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    
        <!-- teams section start -->
        <section class="teams" id="teams">
            <div class="max-width">
                <h2 class="title">团队成员</h2>
                <div class="carousel owl-carousel">
                    <div class="card">
                        <div class="box">
                            <img src="https://q1.qlogo.cn/g?b=qq&nk=82719519&s=640" alt="">
                            <div class="text">李初一</div>
                            <p>摆烂王</p>
                        </div>
                    </div>
                    <div class="card">
                        <div class="box">
                            <img src="https://q1.qlogo.cn/g?b=qq&nk=296258507&s=640" alt="">
                            <div class="text">嘉佳</div>
                            <p>神之画饼能手</p>
                        </div>
                    </div>
                    <div class="card">
                        <div class="box">
                            <img src="https://q1.qlogo.cn/g?b=qq&nk=10001&s=640" alt="">
                            <div class="text">小马哥</div>
                            <p>团队谋划及资金赞助</p>
                        </div>
                    </div>
                    <div class="card">
                        <div class="box">
                            <img src="https://q1.qlogo.cn/g?b=qq&nk=2968624464&s=640" alt="">
                            <div class="text">爆爆</div>
                            <p>跟我一样帅</p>
                        </div>
                    </div>
                    <div class="card">
                        <div class="box">
                            <img src="https://q1.qlogo.cn/g?b=qq&nk=1925512109&s=640" alt="">
                            <div class="text">锤子</div>
                            <p>DUANG</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- contact section start -->
        <section class="contact" id="contact">
            <div class="max-width">
                <h2 class="title">联系</h2>
                <div class="contact-content">
                    <div class="column left">
                        <div class="text">保持联系</div>
                        <p>所以,考虑帮助他会很痛苦。他们的尊严被打破了。谁知道我们生活中没有痛苦的真相?</p>
                        <div class="icons">
                            <div class="row">
                                <i class="fas fa-user"></i>
                                <div class="info">
                                    <div class="head">李初一网络科技工作室</div>
                                    <div class="sub-title">李初一</div>
                                </div>
                            </div>
                            <div class="row">
                                <i class="fas fa-map-marker-alt"></i>
                                <div class="info">
                                    <div class="head">地址</div>
                                    <div class="sub-title">湖南, 长沙</div>
                                </div>
                            </div>
                            <div class="row">
                                <i class="fas fa-envelope"></i>
                                <div class="info">
                                    <div class="head">Email</div>
                                    <div class="sub-title">82719519@qq.com</div>
                                </div>
                            </div>
                        </div>
                    </div>
    <!-- 这里可以自行引入css代码替换链接为按钮 -->
            <div class="column left">
                        <div class="text">联系方式</div>
                        <p>以下是各种联系方式及途径。推荐Telegram方式进行联系。如果没有及时回复那就是在对抗路</p>
                        <div class="icons">
                            <div class="row">
                                <div class="info">
                                    <div class="head">Telegram联系</div><a href="https://t.me/Zy_Lcy">前往Telegram</a>
                                </div>
                            </div>
                            <div class="row">
                                <div class="info">
                                    <div class="head">Twitter联系</div><a href="https://Twitter/Zy_Lcy">前往Twitter</a>
                                </div>
                            </div>
                            <div class="row">
                                <div class="info">
                                    <div class="head">Facebook联系</div><a href="https://Facebook/Zy_Lcy">前往Facebook</a>
        </section>
    
        <!-- footer section start -->
        <footer>
            <span>Created By <a href="https://www.zyw.one">李初一网络科技工作室</a> | <span class="far fa-copyright"></span> 2022 All rights reserved.</span>
        </footer>
    
        <script src="script.js"></script>
    </body>
    </html>

    完成这一步之后我们另外再新建一个文件,导入下方代码并重命名为style.css

    /*  导入谷歌字体 */@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Ubuntu:wght@400;500;700&display=swap');
    
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        text-decoration: none;
    }
    html{
        scroll-behavior: smooth;
    }
    
    /* custom scroll bar */::-webkit-scrollbar {
        width: 10px;
    }
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    ::-webkit-scrollbar-thumb {
        background: #888;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
    
    /* 所有类似的内容样式代码 */section{
        padding: 100px 0;
    }
    .max-width{
        max-width: 1300px;
        padding: 0 80px;
        margin: auto;
    }
    .about, .services, .skills, .teams, .contact, footer{
        font-family: 'Poppins', sans-serif;
    }
    .about .about-content,
    .services .serv-content,
    .skills .skills-content,
    .contact .contact-content{
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    section .title{
        position: relative;
        text-align: center;
        font-size: 40px;
        font-weight: 500;
        margin-bottom: 60px;
        padding-bottom: 20px;
        font-family: 'Ubuntu', sans-serif;
    }
    section .title::before{
        content: "";
        position: absolute;
        bottom: 0px;
        left: 50%;
        width: 180px;
        height: 3px;
        background: #111;
        transform: translateX(-50%);
    }
    section .title::after{
        position: absolute;
        bottom: -8px;
        left: 50%;
        font-size: 20px;
        color: crimson;
        padding: 0 5px;
        background: #fff;
        transform: translateX(-50%);
    }
    
    /* 导航栏样式 */.navbar{
        position: fixed;
        width: 100%;
        z-index: 999;
        padding: 30px 0;
        font-family: 'Ubuntu', sans-serif;
        transition: all 0.3s ease;
    }
    .navbar.sticky{
        padding: 15px 0;
        background: crimson;
    }
    .navbar .max-width{
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .navbar .logo a{
        color: #fff;
        font-size: 35px;
        font-weight: 600;
    }
    .navbar .logo a span{
        color: crimson;
        transition: all 0.3s ease;
    }
    .navbar.sticky .logo a span{
        color: #fff;
    }
    .navbar .menu li{
        list-style: none;
        display: inline-block;
    }
    .navbar .menu li a{
        display: block;
        color: #fff;
        font-size: 18px;
        font-weight: 500;
        margin-left: 25px;
        transition: color 0.3s ease;
    }
    .navbar .menu li a:hover{
        color: crimson;
    }
    .navbar.sticky .menu li a:hover{
        color: #fff;
    }
    
    /* 菜单btn样式 */.menu-btn{
        color: #fff;
        font-size: 23px;
        cursor: pointer;
        display: none;
    }
    .scroll-up-btn{
        position: fixed;
        height: 45px;
        width: 42px;
        background: crimson;
        right: 30px;
        bottom: 10px;
        text-align: center;
        line-height: 45px;
        color: #fff;
        z-index: 9999;
        font-size: 30px;
        border-radius: 6px;
        border-bottom-width: 2px;
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    .scroll-up-btn.show{
        bottom: 30px;
        opacity: 1;
        pointer-events: auto;
    }
    .scroll-up-btn:hover{
        filter: brightness(90%);
    }
    
    
    /* 主页背景图片 */.home{
        display: flex;
        background: url("img/banner.jpg") no-repeat center;
        height: 100vh;
        color: #fff;
        min-height: 500px;
        background-size: cover;
        background-attachment: fixed;
        font-family: 'Ubuntu', sans-serif;
    }
    .home .max-width{
      width: 100%;
      display: flex;
    }
    .home .max-width .row{
      margin-right: 0;
    }
    .home .home-content .text-1{
        font-size: 27px;
    }
    .home .home-content .text-2{
        font-size: 75px;
        font-weight: 600;
        margin-left: -3px;
    }
    .home .home-content .text-3{
        font-size: 40px;
        margin: 5px 0;
    }
    .home .home-content .text-3 span{
        color: crimson;
        font-weight: 500;
    }
    .home .home-content a{
        display: inline-block;
        background: crimson;
        color: #fff;
        font-size: 25px;
        padding: 12px 36px;
        margin-top: 20px;
        font-weight: 400;
        border-radius: 6px;
        border: 2px solid crimson;
        transition: all 0.3s ease;
    }
    .home .home-content a:hover{
        color: crimson;
        background: none;
    }
    
    /* 关于页面样式 */.about .title::after{
        content: "who i am";
    }
    .about .about-content .left{
        width: 45%;
    }
    .about .about-content .left img{
        height: 400px;
        width: 400px;
        object-fit: cover;
        border-radius: 6px;
    }
    .about .about-content .right{
        width: 55%;
    }
    .about .about-content .right .text{
        font-size: 25px;
        font-weight: 600;
        margin-bottom: 10px;
    }
    .about .about-content .right .text span{
        color: crimson;
    }
    .about .about-content .right p{
        text-align: justify;
    }
    .about .about-content .right a{
        display: inline-block;
        background: crimson;
        color: #fff;
        font-size: 20px;
        font-weight: 500;
        padding: 10px 30px;
        margin-top: 20px;
        border-radius: 6px;
        border: 2px solid crimson;
        transition: all 0.3s ease;
    }
    .about .about-content .right a:hover{
        color: crimson;
        background: none;
    }
    
    /* 服务部分样式 */.services, .teams{
        color:#fff;
        background: #111;
    }
    .services .title::before,
    .teams .title::before{
        background: #fff;
    }
    .services .title::after,
    .teams .title::after{
        background: #111;
        content: "what i provide";
    }
    .services .serv-content .card{
        width: calc(33% - 20px);
        background: #222;
        text-align: center;
        border-radius: 6px;
        padding: 50px 25px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    .services .serv-content .card:hover{
        background: crimson;
    }
    .services .serv-content .card .box{
        transition: all 0.3s ease;
    }
    .services .serv-content .card:hover .box{
        transform: scale(1.05);
    }
    .services .serv-content .card i{
        font-size: 50px;
        color: crimson;
        transition: color 0.3s ease;
    }
    .services .serv-content .card:hover i{
        color: #fff;
    }
    .services .serv-content .card .text{
        font-size: 25px;
        font-weight: 500;
        margin: 10px 0 7px 0;
    }
    
    /* 技能部分样式 */
    .skills .title::after{
        content: "what i know";
    }
    .skills .skills-content .column{
        width: calc(50% - 30px);
    }
    .skills .skills-content .left .text{
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 10px;
    }
    .skills .skills-content .left p{
        text-align: justify;
    }
    .skills .skills-content .left a{
        display: inline-block;
        background: crimson;
        color: #fff;
        font-size: 18px;
        font-weight: 500;
        padding: 8px 16px;
        margin-top: 20px;
        border-radius: 6px;
        border: 2px solid crimson;
        transition: all 0.3s ease;
    }
    .skills .skills-content .left a:hover{
        color: crimson;
        background: none;
    }
    .skills .skills-content .right .bars{
        margin-bottom: 15px;
    }
    .skills .skills-content .right .info{
        display: flex;
        margin-bottom: 5px;
        align-items: center;
        justify-content: space-between;
    }
    .skills .skills-content .right span{
        font-weight: 500;
        font-size: 18px;
    }
    .skills .skills-content .right .line{
        height: 5px;
        width: 100%;
        background: lightgrey;
        position: relative;
    }
    .skills .skills-content .right .line::before{
        content: "";
        position: absolute;
        height: 100%;
        left: 0;
        top: 0;
        background: crimson;
    }
    .skills-content .right .html::before{
        width: 90%;
    }
    .skills-content .right .css::before{
        width: 60%;
    }
    .skills-content .right .js::before{
        width: 80%;
    }
    .skills-content .right .php::before{
        width: 50%;
    }
    .skills-content .right .mysql::before{
        width: 70%;
    }
    
    /* 团队部分样式 */.teams .title::after{
        content: "who with me";
    }
    .teams .carousel .card{
        background: #222;
        border-radius: 6px;
        padding: 25px 35px;
        text-align: center;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    .teams .carousel .card:hover{
        background: crimson;
    }
    .teams .carousel .card .box{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    .teams .carousel .card:hover .box{
        transform: scale(1.05);
    }
    .teams .carousel .card .text{
        font-size: 25px;
        font-weight: 500;
        margin: 10px 0 7px 0;
    }
    .teams .carousel .card img{
        height: 150px;
        width: 150px;
        object-fit: cover;
        border-radius: 50%;
        border: 5px solid crimson;
        transition: all 0.3s ease;
    }
    .teams .carousel .card:hover img{
        border-color: #fff;
    }
    .owl-dots{
        text-align: center;
        margin-top: 20px;
    }
    .owl-dot{
        height: 13px;
        width: 13px;
        margin: 0 5px;
        outline: none!important;
        border-radius: 50%;
        border: 2px solid crimson!important;
        transition: all 0.3s ease;
    }
    .owl-dot.active{
        width: 35px;
        border-radius: 14px;
    }
    .owl-dot.active,
    .owl-dot:hover{
        background: crimson!important;
    }
    
    /* 联系界面样式 */.contact .title::after{
        content: "get in touch";
    }
    .contact .contact-content .column{
        width: calc(50% - 30px);
    }
    .contact .contact-content .text{
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 10px;
    }
    .contact .contact-content .left p{
        text-align: justify;
    }
    .contact .contact-content .left .icons{
        margin: 10px 0;
    }
    .contact .contact-content .row{
        display: flex;
        height: 65px;
        align-items: center;
    }
    .contact .contact-content .row .info{
        margin-left: 30px;
    }
    .contact .contact-content .row i{
        font-size: 25px;
        color: crimson;
    }
    .contact .contact-content .info .head{
        font-weight: 500;
    }
    .contact .contact-content .info .sub-title{
        color: #333;
    }
    .contact .right form .fields{
        display: flex;
    }
    .contact .right form .field,
    .contact .right form .fields .field{
        height: 45px;
        width: 100%;
        margin-bottom: 15px;
    }
    .contact .right form .textarea{
        height: 80px;
        width: 100%;
    }
    .contact .right form .name{
        margin-right: 10px;
    }
    .contact .right form .field input,
    .contact .right form .textarea textarea{
        height: 100%;
        width: 100%;
        border: 1px solid lightgrey;
        border-radius: 6px;
        outline: none;
        padding: 0 15px;
        font-size: 17px;
        font-family: 'Poppins', sans-serif;
        transition: all 0.3s ease;
    }
    .contact .right form .field input:focus,
    .contact .right form .textarea textarea:focus{
        border-color: #b3b3b3;
    }
    .contact .right form .textarea textarea{
      padding-top: 10px;
      resize: none;
    }
    .contact .right form .button-area{
      display: flex;
      align-items: center;
    }
    .right form .button-area button{
      color: #fff;
      display: block;
      width: 160px!important;
      height: 45px;
      outline: none;
      font-size: 18px;
      font-weight: 500;
      border-radius: 6px;
      cursor: pointer;
      flex-wrap: nowrap;
      background: crimson;
      border: 2px solid crimson;
      transition: all 0.3s ease;
    }
    .right form .button-area button:hover{
      color: crimson;
      background: none;
    }
    /* 页脚部分样式 */footer{
        background: #111;
        padding: 15px 23px;
        color: #fff;
        text-align: center;
    }
    footer span a{
        color: crimson;
        text-decoration: none;
    }
    footer span a:hover{
        text-decoration: underline;
    }
    
    
    /* 响应媒体查询启动 */@media (max-width: 1104px) {
        .about .about-content .left img{
            height: 350px;
            width: 350px;
        }
    }
    
    @media (max-width: 991px) {
        .max-width{
            padding: 0 50px;
        }
    }
    @media (max-width: 947px){
        .menu-btn{
            display: block;
            z-index: 999;
        }
        .menu-btn i.active:before{
            content: "\f00d";
        }
        .navbar .menu{
            position: fixed;
            height: 100vh;
            width: 100%;
            left: -100%;
            top: 0;
            background: #111;
            text-align: center;
            padding-top: 80px;
            transition: all 0.3s ease;
        }
        .navbar .menu.active{
            left: 0;
        }
        .navbar .menu li{
            display: block;
        }
        .navbar .menu li a{
            display: inline-block;
            margin: 20px 0;
            font-size: 25px;
        }
        .home .home-content .text-2{
            font-size: 70px;
        }
        .home .home-content .text-3{
            font-size: 35px;
        }
        .home .home-content a{
            font-size: 23px;
            padding: 10px 30px;
        }
        .max-width{
            max-width: 930px;
        }
        .about .about-content .column{
            width: 100%;
        }
        .about .about-content .left{
            display: flex;
            justify-content: center;
            margin: 0 auto 60px;
        }
        .about .about-content .right{
            flex: 100%;
        }
        .services .serv-content .card{
            width: calc(50% - 10px);
            margin-bottom: 20px;
        }
        .skills .skills-content .column,
        .contact .contact-content .column{
            width: 100%;
            margin-bottom: 35px;
        }
    }
    
    @media (max-width: 690px) {
        .max-width{
            padding: 0 23px;
        }
        .home .home-content .text-2{
            font-size: 60px;
        }
        .home .home-content .text-3{
            font-size: 32px;
        }
        .home .home-content a{
            font-size: 20px;
        }
        .services .serv-content .card{
            width: 100%;
        }
    }
    
    @media (max-width: 500px) {
        .home .home-content .text-2{
            font-size: 50px;
        }
        .home .home-content .text-3{
            font-size: 27px;
        }
        .about .about-content .right .text,
        .skills .skills-content .left .text{
            font-size: 19px;
        }
        .contact .right form .fields{
            flex-direction: column;
        }
        .contact .right form .name,
        .contact .right form .email{
            margin: 0;
        }
        .right form .error-box{
           width: 150px;
        }
        .scroll-up-btn{
            right: 15px;
            bottom: 15px;
            height: 38px;
            width: 35px;
            font-size: 23px;
            line-height: 38px;
        }
    }

    完成这一步之后我们还需要一个JS文件,新建一个记事本文件导入下方代码并重命名为script.js

    $(document).ready(function(){
        $(window).scroll(function(){
            // sticky navbar on scroll script
            if(this.scrollY > 20){
                $('.navbar').addClass("sticky");
            }else{
                $('.navbar').removeClass("sticky");
            }
            
            // scroll-up button show/hide script
            if(this.scrollY > 500){
                $('.scroll-up-btn').addClass("show");
            }else{
                $('.scroll-up-btn').removeClass("show");
            }
        });
    
        // slide-up script
        $('.scroll-up-btn').click(function(){
            $('html').animate({scrollTop: 0});
            // removing smooth scroll on slide-up button click
            $('html').css("scrollBehavior", "auto");
        });
    
        $('.navbar .menu li a').click(function(){
            // applying again smooth scroll on menu items click
            $('html').css("scrollBehavior", "smooth");
        });
    
        // toggle menu/navbar script
        $('.menu-btn').click(function(){
            $('.navbar .menu').toggleClass("active");
            $('.menu-btn i').toggleClass("active");
        });
    
        // typing text animation script
        var typed = new Typed(".typing", {
            strings: ["网络博主", "开发者", "博客主", "设计师", "自由职业者"],
            typeSpeed: 100,
            backSpeed: 60,
            loop: true
        });
    
        var typed = new Typed(".typing-2", {
            strings: ["网络博主", "开发者", "博客主", "设计师", "自由职业者"],
            typeSpeed: 100,
            backSpeed: 60,
            loop: true
        });
    
        // owl carousel script
        $('.carousel').owlCarousel({
            margin: 20,
            loop: true,
            autoplay: true,
            autoplayTimeOut: 2000,
            autoplayHoverPause: true,
            responsive: {
                0:{
                    items: 1,
                    nav: false
                },
                600:{
                    items: 2,
                    nav: false
                },
                1000:{
                    items: 3,
                    nav: false
                }
            }
        });
    });

    保存三个文件之后在你的桌面点击index.html文件就成功拥有了一款完全属于你自己的个人主页

    这时候你会遇到以下几个问题:

    1:背景图缺失

    2:个人介绍头像图缺失

    3:团队介绍里如何更改团队成员头像

    4:首页文字跳动如何更换

    5:源代码有没有安全隐患

    我答:背景图及个人介绍位置的图片缺失是因为代码里使用的是本地文件,你所创建的代码本地并没有相应的文件名所调用,所以你需要创建一个文件夹并命名为img导入背景图及头像,背景图命名为banner.jpg,头像命名为login.jpg

    关于团队介绍一栏的头像,原版是调用本地文件,但是我为了方便小白我把图片更改为外链模式,这里我放置的是QQ头像的链接,大家仅需更改QQ号即可

    首页跳动文字在JS文件里修改,你只需更改中文或按照示例样式添加文字即可,代码无任何安全隐患,所有源代码都在上面

    如果你要修改配色方案请修改CSS文件里color后面的颜色代码,当然其他的也是支持修改的,非常的简单,对于新手非常的友好

    如果大家有不错的美化想法并成功实施可以在评论区交作业,欢迎大家使用本源代码以及对代码做出美化和修改

  • WordPress侧边栏添加情侣在一起多久

    截图

    在外观——自定义——小工具——侧边栏——自定义HTML添加以下代码

    <div id="lovexhj" style="width: 100%; height: 100px; text-align: center; font-size: 1rem;">
    <div id="lovexhjImage" style="width: 220px; margin: 0 auto;">
    <!-- 左边的头像 -->
    <img src="https://q1.qlogo.cn/g?b=qq&nk=304915556&s=640" alt="love" style="width: 60px; border-radius: 50%;">
    <!-- 中间的图片 -->
    <img src="https://blog.nutssss.cn/wp-content/uploads/2020/02/1582858549-lovexhjlogo.gif" alt="love" style="width: 60px; border-radius: 50%;">
    <!-- 右边的头像 -->
    <img src="https://q1.qlogo.cn/g?b=qq&nk=1656071287&s=640" alt="love" style="width: 60px; border-radius: 50%;">
    </div>
    <p id="lovexhjSitetime" style="font-size: 0.8rem;"></p>
    <script language=javascript>
    function lovexhjSitetime() {
    window.setTimeout("lovexhjSitetime()", 1000);
    var seconds = 1000
    var minutes = seconds * 60
    var hours = minutes * 60
    var days = hours * 24
    var years = days * 365
    var today = new Date()
    var todayYear = today.getFullYear()
    var todayMonth = today.getMonth()
    var todayDate = today.getDate()
    var todayHour = today.getHours()
    var todayMinute = today.getMinutes()
    var todaySecond = today.getSeconds()
    // 时间设置
    var t1 = Date.UTC(2018, 11, 19, 00, 00, 00)
    var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond)
    var diff = t2 - t1
    var diffYears = Math.floor(diff / years)
    var diffDays = Math.floor((diff / days) - diffYears * 365)
    var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours)
    var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) / minutes)
    var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours -
    diffMinutes * minutes) / seconds)
    document.getElementById("lovexhjSitetime").innerHTML = "我们相恋了" + diffYears + "年" + diffDays + "天" +
    diffHours + "小时" + diffMinutes + "分钟" + diffSeconds + "秒啦"
    }
    lovexhjSitetime()
    </script>
    </div>

    使用方法

    html的代码直接在wordpress后台 – 外观 – 小工具 ,然后添加一个自定义html的小工具把代码复制进去就行啦!

    更改时间的代码位置与头像的位置我已经标注出来啦,调用的是QQ头像的接口

    https://q1.qlogo.cn/g?b=qq&nk=您的QQ号&s=640

    只需要更改一下QQ账号即可,大小不用管已经设置好啦!

  • WordPress侧边栏添加天气组件

    展示效果

    操作方法

    • 注册和风天气–>登录–>跳转到用户中心–>点击和风天气控制台
    • 依次点击 插件管理–>创建插件
    • 点击天气标准插件–>根据自己的需求来更改参数,布局选择竖版–>生成代码–>复制你的代码

    WordPress配置

    本文以子比主题为例,其他主题大同小异,基本一致

    1、进入自定义小工具–>所有页面-侧边栏-底部位置–>添加小工具–>自定义HTML

    添加插件代码发布完成