
批改狀態(tài):合格
老師批語(yǔ):總體效果不錯(cuò),繼續(xù)加油
<header>
<nav>
<a href="">首頁(yè)</a>
<a href="">市場(chǎng)營(yíng)銷</a>
<a href="">生產(chǎn)控制</a>
<a href="">技術(shù)研發(fā)</a>
<a href="">品質(zhì)管理</a>
<a href="">工藝文件</a>
</nav>
<button>登錄</button>
</header>
<style>
header{
height: 50px;
background-color: #333;
padding: 0 2em;
display: flex;
place-content: space-between;
}
nav{
display: flex;
text-align: center;
line-height: 50px;
}
nav a{
color: #ccc;
text-decoration: none;
min-width: 7em;
flex: 1;
}
nav a:hover{
color: black;
background-color: aqua;
transition: 0.3s;
font-size: 1.2rem;
}
header button{
border: none;
width: 5em;
color:beige;
background-color:cornflowerblue;
font-size: 1rem;
}
header button:hover{
cursor: pointer;
background-color:aqua;
transition: 0.3s;
color: #000;
}
</style>
<style>
.container{
width: 500px;
height: 150px;
margin-left: 100px;
text-align: center;
display:grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(5, 1fr);
}
.container>.item:first-child{
grid-area: 1 / 1 / span 2 / span 5;
background-color: aliceblue;
}
.container>.item:nth-child(2){
grid-area: 3/2;
}
.container>.item:nth-child(3){
grid-row: 4;
grid-column: 2;
}
.container>.item:last-child{
grid-area: 5/1/5/6;
background-color: antiquewhite;
}
</style>
學(xué)了flex和grid,感覺現(xiàn)在可以做一個(gè)主頁(yè)框架了,細(xì)節(jié)要慢慢優(yōu)化了,遇到不能實(shí)現(xiàn)的地方再查資料,還有就是項(xiàng)目沒有倒角,看上去有點(diǎn)生硬。
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)