单页简约搜索框模版

单页模版 2019-10-01 11:32:47 评论

单页简约搜索框模版

特点:代码简约无杂质,方便优化,纯CSS+HTML 速度快

源码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
        <title>MC小说搜索网</title>
        <meta name="description" content="最新小说信息索引" />

        <link href="/style.css" rel="stylesheet" type="text/css" />
        <link rel="shortcut icon" type="image/x-icon" href="/favicon.png" />
        <script>
        function goSearch() {
    var kw = document.getElementById('search_word');
    var search_a = document.getElementById('search_a');
    if (kw == null || kw.value == '') {
        return;
    }
    url = '/book/' + encodeURIComponent(kw.value) + '/';
    search_a.href = url;
    search_a.click();
}
        </script>
    </head>

<style>
* {
    outline: none;
}
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}
.main {
    width: 100%;
    height: calc(100% - 120px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}
.logo {
    max-width: 40%;
}
.logoimg {
    width: 200px;
    max-width: 100%;
    margin-top: 100px;
    margin-bottom: 40px;
}
.search {
    display: flex;
    width: 621px;
    max-width: 80%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.search_input {
    width: 500px;
    height: 40px;
    outline: none;
    border-left: 1px solid #ccc;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    border-right: none;
    padding: 0 10px;
    line-height: 40px;
    font-size: 15px;
}
.search_input:focus {
    border-left: 1px solid #317ef3;
    border-top: 1px solid #317ef3;
    border-bottom: 1px solid #317ef3;
}
.search_btn {
    width: 100px;
    margin: 0;
    height: 42px;
    border: none;
    background-color: #38f;
    cursor: pointer;
    color: white;
    font-size: 16px;
}
.search_btn:hover {
    background-color #317ef3;
    box-shadow: 1px 1px #ccc;
}
.keyword {
    width: 641px;
    max-width: 80%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 40px;
}
.keyword > a {
    width: 100px;
    text-align: left;
    font-size: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin: 4px 0;
}
.copy {
    width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    color: gray;
    padding: 60px 0 40px 0;
}

.result_logowrap {
    display: none;
    margin: 20px 10%;
    max-width: 100%;
    text-align: center;
}
.result_logo {
    max-width: 40%;
}
.result_logoimg {
    width: 200px;
    max-width: 100%;
}
.result_wrap {
    margin: 20px 10%;
    max-width: 100%;
}

.result_wrap  ul {
    list-style-type: square;
}
.result {
    width: 600px;
    max-width: 100%;
    margin: 20px 0;
}

.result > a {
    font-size: 16px;
    font-family: monospace;
    font-weight: normal;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    margin: 0 0 4px 0;
    text-align: justify;
}
.result > .desc {
    font-size: 13px;
    text-align: justify;
    max-width: 100%;
}
.result em {
    font-style: normal;
    color: #c00;
}
.relates {
    width: 600px;
    max-width: 100%;
    margin: 20px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}
.relates > .title {
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}
.relates > a {
    width: 200px;
    max-width: 50%;
    display: block;
    font-size: 14px;
}
.relates > span {
    width: 200px;
    max-width: 50%;
    display: block;
    font-size: 14px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
</style>
    <body>
        <div class="main">
            <a class="logo" href="/" title="MC小说搜索网">
                <img class="logoimg" src="/logo.png" />
            </a>
            <div class="search">
                <input class="search_input" id='search_word' />
                <a style="display:none" href="" id="search_a" name="search_a" target="_blank"></a>
                <button class="search_btn" onclick="goSearch();">搜索</button>
            </div>
            <div class="keyword">
                <a href="/book/文明试炼场/" title="文明试炼场" target="_blank">文明试炼场</a><a href="/book/南明风雨/" title="南明风雨" target="_blank">南明风雨</a><a href="/book/终极雇佣/" title="终极雇佣" target="_blank">终极雇佣</a><a href="/book/金鳞化龙/" title="金鳞化龙" target="_blank">金鳞化龙</a><a href="/book/办公室偷情小说/" title="办公室偷情小说" target="_blank">办公室偷情小说</a><a href="/book/复仇公主的樱花爱恋/" title="复仇公主的樱花爱恋" target="_blank">复仇公主的樱花爱恋</a><a href="/book/办公室下药被强干小说/" title="办公室下药被强干小说" target="_blank">办公室下药被强干小说</a><a href="/book/重生之陌上花开/" title="重生之陌上花开" target="_blank">重生之陌上花开</a><a href="/book/丫鬟挨板子/" title="丫鬟挨板子" target="_blank">丫鬟挨板子</a><a href="/book/天眼 复仇 小说/" title="天眼 复仇 小说" target="_blank">天眼 复仇 小说</a><a href="/book/终极强者/" title="终极强者" target="_blank">终极强者</a><a href="/book/生死七龙珠/" title="生死七龙珠" target="_blank">生死七龙珠</a><a href="/book/老婆爱上我全文阅读/" title="老婆爱上我全文阅读" target="_blank">老婆爱上我全文阅读</a><a href="/book/穿越之霸道王妃/" title="穿越之霸道王妃" target="_blank">穿越之霸道王妃</a><a href="/book/江湖英雄录/" title="江湖英雄录" target="_blank">江湖英雄录</a><a href="/book/天职杀手/" title="天职杀手" target="_blank">天职杀手</a><a href="/book/九界传奇/" title="九界传奇" target="_blank">九界传奇</a><a href="/book/生化女仆兵器传说/" title="生化女仆兵器传说" target="_blank">生化女仆兵器传说</a><a href="/book/神魔帝尊/" title="神魔帝尊" target="_blank">神魔帝尊</a><a href="/book/恶魔契约之倒霉丫头/" title="恶魔契约之倒霉丫头" target="_blank">恶魔契约之倒霉丫头</a><a href="/book/至尊鬼王/" title="至尊鬼王" target="_blank">至尊鬼王</a><a href="/book/连载小说下载/" title="连载小说下载" target="_blank">连载小说下载</a><a href="/book/17k原创小说网/" title="17k原创小说网" target="_blank">17k原创小说网</a><a href="/book/游戏军火商/" title="游戏军火商" target="_blank">游戏军火商</a><a href="/book/鬼交 小说/" title="鬼交 小说" target="_blank">鬼交 小说</a><a href="/book/异世丹药大亨/" title="异世丹药大亨" target="_blank">异世丹药大亨</a><a href="/book/非婚不可/" title="非婚不可" target="_blank">非婚不可</a><a href="/book/天行失落叶/" title="天行失落叶" target="_blank">天行失落叶</a><a href="/book/小说排行榜完结版/" title="小说排行榜完结版" target="_blank">小说排行榜完结版</a><a href="/book/茅山宗师/" title="茅山宗师" target="_blank">茅山宗师</a>            </div>
        </div>
        <div class="copy">&copy;2019 xxxxxxxxxxxxxx</div>
    </body>
</html>

 

上一篇:没有了
下一篇:漂亮简约广告宣传单页

评论

说点什么吧
  • 全部评论(0
    还没有评论,快来抢沙发吧!