Javascript入门(一)导航栏实现

Javascript是一种解释性语言,而且Javascript只支持单线程,分别为同步调用和异步调用

5

先下载HBuilderX工具,然后新建工程

1

目标效果图

3

<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8" />
	<title></title>
	<style type="text/css">
		div.taobao{
                    background-color: #ff9000;
                    width: 990px;
                    height:30px;
                    display: -webkit-box;
		   -webkit-box-orient: horizontal;
		   -webkit-box-pack: center;
		   -webkit-box-align: center;
                    display: -moz-box;
		   -moz-box-orient: horizontal;
		   -moz-box-pack: center;
		   -moz-box-align: center;
		  
		   display: -o-box;
		   -o-box-orient: horizontal;
		   -o-box-pack: center;
		   -o-box-align: center;
		  
		   display: -ms-box;
		   -ms-box-orient: horizontal;
		   -ms-box-pack: center;
		   -ms-box-align: center;
		  
		   display: box;
		   box-orient: horizontal;
		   box-pack: center;
		   box-align: center;
		}
		*{
			margin:0;
			padding:0;
		}
		ul{
			list-style: none;
		}
		li{
			color:#FFFFFF;
			margin:0 10px;
			float:left;
			line-height: 30px;
			font-weight: bold;
			text-align: center;
			font-size: 16px;
		}
	</style>
	</head>
	<body>
		<div class="taobao">
			<ul>
				<li>天猫</li>
				<li>聚划算</li>
				<li>天猫超市</li>
			</ul>
		</div>
	</body>
</html>

小技巧:div.taobao>ul>li*3加Tab键,可以批量生成

4

猜你喜欢

转载自blog.csdn.net/weixin_41987016/article/details/107176448