当前位置:首页原创文章极主题-视频背景搜索模块代码

极主题-视频背景搜索模块代码

提示:CSS代码存入子主题style.css样式文件中,之后强制刷新。下图为测试之后的效果。

提示:CSS代码存入子主题style.css样式文件中,之后强制刷新。下图为测试之后的效果。

HTML代码:

请在首页模块中添加自定义代码将以下代码复制到自定义代码中!

<div class="home-banner por">
    <section class="section">
        <div class="video-wrapper">
            <video autoplay="" playsinline="" loop="" muted="" src="https://down-img-qn.51miz.com/preview/video/00/00/12/39/V-123908-EC20C0D1.mp4">
            </video>
        </div>
        <div class="video-overlay">
        </div>
    </section>
    <div class="wrapper  poa" style="top: 0;left: 50%;margin-left: -600px;">
        <div class="home-banner-content Onecad_clearfix">
            <div class="slogan-text por fl">
                <p>
                    海量优质素材欢迎下载
                </p>
                <a href="" target="_blank">
                    <i class="iblock poa corner" style="background:url(http://7b2.jitheme.com/wp-content/themes/b2Jitheme/Center/Assets/images/hot.svg) no-repeat;">
                    </i>
                </a>
                <p class="promote-sub-title line-one">
                    开通VIP免费下载全站内容
                </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="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="search_baidu" placeholder="输入关键词 按回车搜索">
                            <button type="submit" name="" class="btn search_baidu">
                                百度搜索
                            </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="search_bing" placeholder="输入关键词 按回车搜索">
                            <button type="submit" name="" class="btn search_bing">
                                Bing搜索
                            </button>
                        </form>
                        <form class="search hidden" id="search_3" action="http://7b2.jitheme.com/?s="
                        method="get" target="_blank">
                            <input type="text" name="q" class="" placeholder="输入关键词 按回车搜索">
                            <button type="submit" name="" class="btn ">
                                站内搜索
                            </button>
                        </form>
                        <form class="search" id="search_4" action="http://7b2.jitheme.com/?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_5" action="https://so.toutiao.com/search?dvpf=pc&amp;source=input&amp;keyword="
                        method="get" target="_blank">
                            <input type="text" name="query" class="search_toutiao" placeholder="输入关键词 按回车搜索">
                            <button type="submit" name="" class="btn search_toutiao">
                                头条搜索
                            </button>
                        </form>
                        <form class="search hidden" id="search_6" action="https://www.zhihu.com/search?q="
                        method="get" target="_blank">
                            <input type="text" name="q" class="search_zhihu" placeholder="输入关键词 按回车搜索">
                            <button type="submit" name="" class="btn search_zhihu">
                                知乎搜索
                            </button>
                        </form>
                        <form class="search hidden" id="search_7" action="https://www.so.com/s?q="
                        method="get" target="_blank">
                            <input type="text" name="q" class="search_360" placeholder="输入关键词 按回车搜索">
                            <button type="submit" name="" class="btn search_360">
                                360搜索
                            </button>
                        </form>
                        <div class="tag">
                            <a href="http://7b2.jitheme.com/?s=7B2 " target="_blank">
                                7B2
                            </a>
                            <a href="http://7b2.jitheme.com/?s=极主题 " target="_blank">
                                极主题
                            </a>
                            <a href="http://7b2.jitheme.com/?s=子主题 " target="_blank">
                                子主题
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 头部快速链接导航 -->
    <div class="top-navs poa">
        <div class="wrapper layout-center Onecad_clearfix">
            <div class="top-navs-l fl">
                <!-- 首页搜索左长条重点展示5组 -->
                <div class="top-navs-l-item fl">
                    <p class="top-navs-l-title">
                        <a href="https://www.jitheme.com/" target="_blank" class="block">
                            <img src="http://7b2.jitheme.com/wp-content/uploads/2022/05/2022052806023861.svg"
                            alt="此组可关闭">
                            <span class="wz">
                                此组可关闭
                            </span>
                        </a>
                    </p>
                    <p class="top-navs-l-links">
                        <a href="链接" class="fl" target="_blank">
                            适量图
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            SVG
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            代码
                        </a>
                    </p>
                </div>
                <div class="top-navs-l-item fl">
                    <p class="top-navs-l-title">
                        <a href="https://www.jitheme.com/" target="_blank" class="block">
                            <img src="http://7b2.jitheme.com/wp-content/uploads/2022/05/2022052806023997.svg"
                            alt="模板源码">
                            <span class="wz">
                                模板源码
                            </span>
                        </a>
                    </p>
                    <p class="top-navs-l-links">
                        <a href="链接" class="fl" target="_blank">
                            前端
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            框架
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            后台
                        </a>
                    </p>
                </div>
                <div class="top-navs-l-item fl">
                    <p class="top-navs-l-title">
                        <a href="https://www.jitheme.com/" target="_blank" class="block">
                            <img src="http://7b2.jitheme.com/wp-content/uploads/2022/05/2022052806023928.svg"
                            alt="PSD打包下载">
                            <span class="wz">
                                PSD打包下载
                            </span>
                        </a>
                    </p>
                    <p class="top-navs-l-links">
                        <a href="链接" class="fl" target="_blank">
                            节日图
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            PSD
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            笔刷
                        </a>
                    </p>
                </div>
                <div class="top-navs-l-item fl">
                    <p class="top-navs-l-title">
                        <a href="https://www.jitheme.com/" target="_blank" class="block">
                            <img src="http://7b2.jitheme.com/wp-content/uploads/2022/05/2022052806024067.svg"
                            alt="素材资源">
                            <span class="wz">
                                素材资源
                            </span>
                        </a>
                    </p>
                    <p class="top-navs-l-links">
                        <a href="链接" class="fl" target="_blank">
                            超级素材
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            插画
                        </a>
                    </p>
                </div>
                <div class="top-navs-l-item fl">
                    <p class="top-navs-l-title">
                        <a href="https://www.jitheme.com/" target="_blank" class="block">
                            <img src="http://7b2.jitheme.com/wp-content/uploads/2022/05/2022052806024118.svg"
                            alt="视频模板">
                            <span class="wz">
                                视频模板
                            </span>
                        </a>
                    </p>
                    <p class="top-navs-l-links">
                        <a href="链接" class="fl" target="_blank">
                            会声会影
                        </a>
                        <a href="链接" class="fl" target="_blank">
                            AE视频
                        </a>
                    </p>
                </div>
            </div>
            <div class="top-navs-r fl Onecad_clearfix">
                <a class="fl" rel="nofollow" target="_blank" href="https://www.jitheme.com/210.html">
                    <img src="http://7b2.jitheme.com/wp-content/uploads/2022/05/2022052806005474.svg"
                    alt="会员下载">
                    <p>
                        会员下载
                    </p>
                </a>
                <a class="fl" rel="nofollow" target="_blank" href="https://www.jitheme.com/vips">
                    <img src="http://7b2.jitheme.com/wp-content/uploads/2022/05/2022052806005337.svg"
                    alt="开通VIP">
                    <p>
                        开通VIP
                    </p>
                </a>
            </div>
        </div>
    </div>
</div>

CSS代码:

子主题CSS样式文件中追加下面的CSS代码,之后强制刷新即可。

.search_360{
    color:#fff;
    background-color:#28bc5b;
}
.search_baidu{
    color:#fff;
    background-color:#4E6EF2;
}
.search_bing{
    color:#fff;
    background-color:#ffc20e;
}
.search_toutiao{
    color:#fff;
    background-color:#f04142;
}
.search_zhihu{
    color:#fff;
    background-color:#06f;
}
#page-wrapper {
	padding-bottom:16px;
	margin-top:-85px
}
.home-banner {
	height:550px;
        margin-top: -16px;
	position:relative;
	/* z-index:1; */
	background-position:0 100%;
	animation:gradient 12s ease-in-out infinite;
}
.home-banner .section {
	position:relative;
	width:100%;
	overflow:hidden;
	max-height:550px;
	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: 340px;
    top: 10px;
}
.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:var(--b2color);
}
.home-banner>.layout-center {
	height:100%
}
.home-banner-content {
    padding-top: 130px;
    margin-left: 182px;
    margin-bottom: 30px;
}
.home-banner-content .slogan-text p {
	font-size:18px;
	line-height:24px;
	letter-spacing:2px;
	font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.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:20px
}
.home-banner-search {
	width:800px;
	margin-left:209px;
	height:auto
}
.home-banner-search .tag {
    position: absolute;
    right: 100px;
    top: 0;
    padding: 15px 10px;
}
.home-banner-search .tag a:hover {
    background: var(--b2color);
    color: #fff;
}
.home-banner-search .tag a {
    display: inline;
    padding: 0px 8px;
    border-radius: 10px;
    background: #EFEFEF;
    float: left;
    margin: 5px;
    height: 20px;
    line-height: 20px;
    color: #A0A0A0;
    font-size: 12px;
}
/*.home-banner-search form {*/
/*	margin-bottom:10px;*/

/*}*/
.home-banner-search form>input {
	width:100%;
	height: 50px;
	background:#fff;
	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;
	color: #000;
	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: 40px;
    line-height: 40px;
    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:var(--b2color);
}
.home-banner .search-types-cycles {
	width:106px;
	height:290px;
	background:linear-gradient(180deg,rgba(0,0,0,0) 0,rgb(255 96 0 / 17%) 51.04%,rgba(0,0,0,0) 100%);
	left:625px;
	top:-95px;
	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:var(--b2color);
}
.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,var(--b2color) 50%,transparent 100%)
}
.home-banner .search-types-cycles ul:after {
	left:auto;
	right:0
}
.home-banner .search-types-cycles ul li {
	height:30px !important;
	line-height:30px !important;
	font-size:16px;
	text-align:center;
	cursor:pointer;
	user-select:none
}
.home-banner .search-types-cycles ul li:hover {
	color:var(--b2color);
}
.home-banner .search-types-cycles ul li:nth-of-type(4) {
	height:60px!important;
	line-height:60px!important;
}
.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:var(--b2color);
}
.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
}

.top-navs {
	width:100%;
	/* height:70px; */
	bottom: 0px;
	padding-top: 16px;
	left:0;
	/* padding:12px 0; */
	/* z-index:1; */
	backdrop-filter: blur(10px);
}
.top-navs .top-navs-l {
	width: calc(100% - 180px);
	display:flex;
	justify-content:center;
	align-items:center;
	margin:0 auto;
	border-right:1px solid rgb(255 255 255 / 10%)
}
.top-navs .top-navs-l-item {
	width:20%;
	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 .wz {
	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;
	margin-top: -5px;
}
.top-navs .top-navs-l-item .top-navs-l-title a:hover {
	color:var(--b2color);
}
.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:#fff;
	margin:0 10px;
	text-shadow:1px 1px 1px #000
}
.top-navs .top-navs-l-item .top-navs-l-links a:hover {
	color:var(--b2color);
}
.top-navs .top-navs-m {
	width:176px;
	height:61px;
	border-right:1px solid rgba(255,255,255,.25);
	padding:0 24px;
	display:none;
	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:var(--b2color);
}
.top-navs .top-navs-m div p,.top-navs .top-navs-m>a {
	margin-bottom: 25px;
}
.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:var(--b2color);
}
.top-navs .top-navs-r {
	width:176px
}
.top-navs .top-navs-r a {
	width:50%;
	padding-left:30px;
	text-align:center;
}
.top-navs .top-navs-r a i {
	font-size:36px;
	margin-bottom:10px
}
.top-navs .top-navs-r img {
	height: 40px;
	width: 40px;
	margin-top: -3px;
}
.top-navs .top-navs-r a p {
	font-size:14px;
	line-height:40px;
	color:#fff;
	text-shadow:1px 1px 1px #000
}
.top-navs .top-navs-r a p:hover {
	color:var(--b2color);
}
.por {
	position:relative
}
.poa {
	position:absolute
}
.pof {
	position:fixed
}
.Onecad_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
}
.block {
	display:block
}

.icon-rank {
	width:auto;
	display:inline-block;
	border:none;
	overflow:hidden;
	vertical-align:-3px
}
img.icon-rank {
	width:20px;
	height:20px;
	margin-right:0px
}
a.hot-top.text-notify:hover {
	color:var(--b2color);
}

p.top-navs-l-title {
	margin-bottom:8px
}
.top-navs-l-title i{
   	width:1em;
	height:1em;
	float: left;
}
.left-cont{
	border: 5px solid rgb(255 255 255 / 18%);
}
.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
}
.primary-menus .left-cont button {
	height: 50px;
	box-sizing:border-box;
	min-width:100px;
	/* margin-left: 0px; */
	cursor:pointer;
	color:#fff;
	font-size:15px;
	line-height:40px;
	position:absolute;
	right: 5px;
	top: 5px;
	border-radius:1px;
	padding:0 15px;
	width:106px;
	transform:translateY(0px);
}
.slogan-text.por.fl {
    margin-left: 200px;
    text-align: center;
    margin-bottom: 20px;
}
@media screen and (max-width:768px) {
	#page-wrapper {
	display:none
}

}

给TA赞助
共{{data.count}}人
人已赞助
原创文章

WP插件的一个实例代码!

2023-9-7 17:27:35

WP教程原创文章

WordPress:注册新的 REST 接口

2023-9-8 23:14:34

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
购物车
优惠劵
有新私信 私信列表
搜索