尝试写一个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;
}

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注