简洁的导航栏

导航栏-html+css
学了一丢丢html+css后就自己做了个导航栏,记录一下下
@( ̄- ̄)@
看起来简洁,但代码好像很啰嗦emm
在这里插入图片描述
代码:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>start_html</title>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			/*导航栏*/
			.div1{
				height: 50px;
				/*--background-image: url("63190571_we0.png");*/
				background-color: #333;
				position: fixed;
				width: 100%;
			}
			/*头像框*/
			.tx{
				background-image: url("tx.jpg");
				background-size: 100%,100%;
				float: left;
				height: 50px;
				width: 50px;
				border-radius: 50px;
				margin-left: 20px;
			}
			.name{
				font-size: 25px;
				font-family: "微软雅黑";
				font-weight: bold;
				color: #66CCFF;
				text-align: center;
				line-height: 50px;
				float: left;
				width: 80px;
				
			}
			.ui1{
				text-align: center;
				padding-right: 80px;
			}
			li{
				float: right;
				list-style: none;
				display: inline-block;
				height: 50px;
				padding-right: 35px;
			}
			a{
				text-decoration: none;
				font-family: "微软雅黑";
				font-weight: bold;
				line-height: 50px;
				color: #fff;
			}
			.aa{
				color: #66CCFF;
			}
		</style>
	</head>
	<body>
		<div id="" class="div1">
			<div class="tx">
			</div>
			<div class="name">
				时 夜
				<!--名字-->
			</div>
			<ul class = "ui1">
				<li><a href="#">关于</a></li>
				<li><a href="#">友链</a></li>
				<li><a href="#">博客</a></li>
				<li><a href="#" class="aa">首页</a></li>
			</ul>
		</div>
		
	</body>
</html>

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值