我的代码不起作用,我不明白为什么。。。
我用的是flex-box,我是新来的,如果解决方法简单的话,我很抱歉。
谢谢您
@charset "UTF-8";
/* CSS Document */
body {
margin: 0;
font-size: 28px;
background-color: #747474;
}
/* Style the navbar */
#navbar {
overflow: hidden;
background: rgba(191, 191, 191 ,0.5);
display: flex;
justify-content: flex-end;
}
.test:nth-child(1){
order: 1;
align-items: flex-start;
}
.test:nth-child(2){
order: 4;
}
.test:nth-child(3){
order: 3;
}
.test:nth-child(4){
order: 2;
}
.test:nth-child(5){
order: 5;
}
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="CSS/style2.css" />
<link rel="shortcut icon" href="IMAGES/PNG/favicon.png" />
<head>
<meta charset="utf-8" />
<title>Electrophotonique Ingenierie</title>
</head>
<body>
<div class="test2">
<div id="navbar">
<div class="test"> <a href= "index2.html">Electrophotonique Ing.</a></div>
<div class="test"> <a class="active" href="javascript:void(0)">Blog</a></div>
<div class="test"> <a href="blog">Contact</a></div>
<div class="test"> <a href="blog">L'électrophotonique</a></div>
<div class="test"> <a href="blog">Qui sommes nous?</a></div>
</div>
<div class="content">
</div>
<script type="text/javascript" src="JS/sticky_navbar.js"></script>
</body>
</html>