尝试写一个Matrix官网导航栏

效果图
在这里插入图片描述

代码:

<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <title>Matrix导航</title>
    <link rel="stylesheet" type="text/css" href="reset.css">
    <style>
        .site-header{
            width: 100%;
            height:100px;
            background-color: #0c589b;
            border: 3px solid #0c589b;
        }
        .container{
            width:1226px;
            margin:0 auto;
            background-color: white;
        }
        .site-header .nav-logo{
            float: left;
            margin-top: 22px;
            margin-left: 30px;
        }
        .nav-logo a{
            display: block;
            width:56px;
            height:56px;
        }
        .site-header .nav-list{
            float:left ;
            width: 730px;
            height:88px;
            padding: 12px 0 0 30px;
        }
        .clearFix::after{
            content: '';
            clear:both;
            display: block;
        }
        .nav-list li{
            float: left;
            font-size: 20px;
        }
        .nav-list li a{
            display: block;
            color:  #0c589b;
            padding: 28px 20px 38px;
        }
        .site-search {
            float: left;
            width:296px;
            margin-top: 25px;

        }
        .site-search form{
            height: 50px;
            width: 296px;
            position: relative;
        }
        .site-search form input.content{
            width: 220px;
            height: 48px;
            border: 1px solid #2995f4;
            padding: 0 10px;
            float: left;
        }
        .site-search form input.search{
            width: 48px;
            height: 50px;
            border:1px solid #2995f4;
            float:left;
            margin-left: -1px;
        }
        .search-hot-word{
            position:absolute;
            top:16px;
            left:10px;
        }
        .search-hot-word span{
            color: grey;
        }
        .search-hot-word span:hover{
            cursor:pointer ;
            color: #333333;
        }

    </style>
</head>
<body>
<div class="site-header">
    <div class="container clearFix">
        <div class="nav-logo">
            <a href="#">
                <img src="02.jpg" height="56">
            </a>
        </div >
        <ul class="nav-list">
            <li>
                <a href="#">工作室</a>
            </li>
            <li>
                <a href="#">核心成员</a>
            </li>
            <li>
                <a href="#">成员考勤</a>
            </li>
            <li>
                <a href="#">学习资料</a>
            </li>
            <li>
                <a href="#">项目</a>
            </li>
            <li>
                <a href="#">奖惩制度</a>
            </li>
        </ul>
        <div class="site-search">
            <form>
                <input type="text" name="" class="content">
                <input type="submit" name="" value="搜索" class="search">
                <div class="search-hot-word">
                    <span>MySQL面试题</span>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>

reset.css:

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
a{
    text-decoration: none;
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值