
批改狀態(tài):合格
老師批語:現(xiàn)在是學(xué)習(xí)階段, 先從模仿開始
作業(yè)一:書寫flex元素上的六個屬性:
1、元素寬度 flex-basis:
屬性值: auto px,% ,min-widht
設(shè)置了元素寬度后,元素就有兩個寬度屬性:原始寬度和顯示寬度(顯示優(yōu)先級:flex-basis>原始寬度)
2、元素擴展 flex-grow:
屬性值:0-1(默認(rèn)值0 不分配主軸上的剩余寬度)
屬性值大于1時,元素值按,各個元素的大于1的值比例等分主軸剩余空間
3、元素收縮:flex-shrink:
屬性值:0-1 (默認(rèn)值1,元素之家1:1比例收縮自動收縮適應(yīng)flex項目的大小)
4、上述flex元素三個屬性簡寫:flex:
0,1,auto 默認(rèn)值 等同于 flex:1;
1,1,auto 等同于 flex:2;
none 取消flex元素的伸縮屬性
5、flex元素在交叉軸上的對其方式 align-item:
屬性值:flex-start flex-end center
6、flex元素在主軸上的排列順序:order:
值越小越靠前,不設(shè)置按照html編寫順序排列
知識點補充:
1、border常用樣式:solid(實線)、dashed(虛線) dotted(點線)、double(雙線)
2、盒子陰影:box-shadow:
水平陰影、垂直陰影(前兩項時必協(xié)參數(shù))、陰影模糊距離、陰影大小、陰影顏色和 內(nèi)外陰影(默認(rèn)外陰影 inset內(nèi)陰影)
作業(yè)二:
頁面組件開發(fā):
1、整體規(guī)劃非常重要:公共組件、專用組件
2、各個組件之間的關(guān)聯(lián)和利用
3、網(wǎng)站頁面的規(guī)劃
作業(yè)三:
組件開發(fā):
目錄圖:
公共重置代碼:
* {
padding: 0;
margin:0;
/*outline: 1px dashed red;*/
}
body {
font-size:13px;
color: #333333;
font-family: "Adobe 宋體 Std L";
}
a {
text-decoration:none;
font-size:13px;
color:#666666;
}
li {
list-style: none;
}
首頁導(dǎo)航代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../../../font/iconfont.css">
<link rel="stylesheet" href="public-header.css">
<title>公共頭部</title>
</head>
<body>
<div class="public-header">
<a href="">網(wǎng)站首頁</a>
<a href="">專題</a>
<a href="">網(wǎng)站導(dǎo)航</a>
<a href="">二手商品</a>
<a href="">討論</a>
<span>
<a href=""><<i calss="iconfont icon-huiyuan2"></i>登陸</a>
<a href=""><i>免費注冊</i></a>
</span>
</div>
</body>
</html>
首頁導(dǎo)航css:
/*導(dǎo)入公共默認(rèn)*/
@import url(../../public_reset.css);
.public-header {
height:44px;
background-color:black;
padding:0 20px;
display:flex;
flex-flow:row nowrap;
}
.public-header > a {
line-height:44px;
color: #cccccc;
margin:0 10px;
}
.public-header > a:hover {
background-color: #fff;
color:#222222;
}
.public-header > span {
margin-left:auto;
align-self: center;
}
.public-header > span > a{
margin:0 10px;
color:#cccccc;
}
.public-header > span i {
padding-right:6px;
}
首頁導(dǎo)航效果圖:
首頁頭標(biāo)題代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>public-headline</title>
<link rel="stylesheet" href="public-headline.css">
</head>
<body>
<div class="public-headline">
<span>二手交易</span>
</div>
</body>
</html>
首頁頭標(biāo)題css:
@import url(../../public_reset.css);
.public-headline {
padding: 40px;
text-align: center;
}
.public-headline > span {
font-size:40px;
font-weight: bolder;
padding-bottom:7px;
border-bottom: 2px solid red;
}
首頁頭標(biāo)題效果圖:
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號