width: 15px;
height: 15px;
background-image: url(“…/imag/xiangyou1.png”);
background-position: center center;
background-size: 100% auto;
background-repeat: no-repeat;
}
.picture {
width: 80%;
height: 90%;
height: 281px;
flex: 3;
display: flex;
flex-direction: row;
justify-content: space-around;
margin: 0px;
}
.picture .img_1 {
flex: 1;
}
.picture .img_2 {
flex: 1;
}
.picture .img_3 {
flex: 1;
}
- {
margin: 0;
padding: 0;
}
.nav {
width: 100%;
height: 44px;
background-color: rgba(0, 0, 0, 0.8);
display: flex;
justify-content: center;
align-items: center;
font-family: “宋体”;
font-size: 12px;
}
.nav a {
color: #fff;
/* 设置a标签下划线为none */
text-decoration: none;
width: 102px;
text-align: center;
}
.nav > .logo {
height: 44px;
width: 44px;
background-image: url(“…/imag/logo.png”);
background-repeat: no-repeat;
background-position: center;
}
.nav > .search {
width: 44px;
height: 44px;
background-image: url(“…/imag/search.png”);
background-repeat: no-repeat;
background-position: center;
}
.nav > .buy {
width: 44px;
height: 44px;
background-image: url(“…/imag/buy.png”);
background-repeat: no-repeat;
background-position: center;
}
label {
width: 44px;
height: 44px;
}
.togglebtn {
width: 44px;
display: none;
position: relative;
flex-direction: column;
justify-content: center;
align-items: center;
}
.togglebtn > .line {
width: 18px;
height: 1px;
background-color: #fff;
display: none;
transition: all 0.5s;
transform-origin: left center;
}
.togglebtn .line:nth-child(1) {
position: absolute;
top: 15px;
}
.togglebtn .line:nth-child(2) {
position: absolute;
top: 27px;
}
/*
设定屏幕小于768像素时的像素
*/
.navpage {
width: 100vw;
overflow: hidden;
display: flex;
height: 0vh;
transition: all 0.8s;
position: fixed;
left: 0;
top: 0;
background-color: #000;
}
.navpage .navmain {
width: 100%;
}
@media only screen and (max-width: 768px) {
.togglebtn {
display: flex;
position: relative;
z-index: 100;
}
.nav > .logo {
position: relative;
z-index: 100;
}
.togglebtn > .line {
display: block;
}
.nav > .text {
display: none;
}
. 《大厂前端面试题解析+Web核心总结学习笔记+企业项目实战源码+最新高清讲解视频》无偿开源 徽信搜索公众号【编程进阶路】 nav {
justify-content: space-between;
}
.nav > a {
width: 50px;
}
.nav .togglebtn {
order: 1;
}
.nav .logo {
order: 2;
}
.nav .buy {
order: 3;
}
#choose:checked ~ .togglebtn .line:nth-child(1) {
transform: rotate(44deg);
}
#choose:checked ~ .togglebtn .line:nth-child(2) {
transform: rotate(-43deg);
}
#choose:checked ~ .navpage {
display: flex;
/*
vw:viewport width 视窗的宽度 ==100vw =100%视窗的高度
vh:viewport height:100vh == 100% viewport height
*/
width: 100vw;
height: 100vh;
color: #fff;
position: fixed;
left: 0;
top: 0;
background-color: #000;
flex-direction: column;
padding-top: 44px;
}
.searchInput {
margin: 0px 28px;
display: flex;
justify-content: flex-start;
align-items: center;
height: 44px;
border-radius: 4px;
color: #ccc;
background-color: rgba(45, 45, 45, 0.98);
}
.searchInput .icon {
width: 32px;
height: 36px;
background-image: url(“…/imag/search.png”);
background-repeat: no-repeat;
background-position: center;
/* 设置图片背景时,一定要考虑 图片的url 位置 尺寸 重复*/
}
.searchInput input {
flex: 1;
margin: 0 10px;
height: 100%;
background: transparent;
border: none;
outline: none;
color: #fff;
}
hr {
border-color: #333;
margin-top: 15px;
}
.navList {
margin: 0 28px;
display: flex;
flex-direction: column;
justify-content: center;
}
.navList a {
width: 100%;
height: 44px;
color: #fff;
text-align: left;
line-height: 44px;
border-bottom: 1px solid #333;
}
.navList a:last-child {
border-bottom: none;
}
}
练习完结版
<meta
name=“viewport”
content=“width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no”
/>
让节日,快乐每一个人。
让节日,
快乐每一个人。



新款
更大屏幕腕上见
更大屏幕腕上见
iphonestyle
- {
margin: 0;
padding: 0;
}
.nav {
width: 100%;
height: 44px;
background-color: rgba(0, 0, 0, 0.8);
display: flex;
justify-content: center;
align-items: center;
font-family: “宋体”;
font-size: 12px;
}
.nav a {
color:rgba(255,255,255,0.82);
/* 设置a标签下划线为none */
text-decoration: none;
width: 102px;
text-align: center;
}
.nav a:hover{
color: #fff;
}
.nav > .logo {
height: 44px;
width: 44px;
background-image: url(“…/imag/logo.png”);
background-repeat: no-repeat;
background-position: center;
}
.nav > .search {
width: 44px;
height: 44px;
background-image: url(“…/imag/search.png”);
background-repeat: no-repeat;
background-position: center;
}
.nav > .buy {
width: 44px;
height: 44px;
background-image: url(“…/imag/buy.png”);
background-repeat: no-repeat;
background-position: center;
}
label {
width: 44px;
height: 44px;
}
.togglebtn {
width: 44px;
display: none;
position: relative;
flex-direction: column;
justify-content: center;
align-items: center;
}
.togglebtn > .line {
width: 18px;
height: 1px;
background-color: #fff;
display: none;
transition: all 0.5s;
transform-origin: left center;
}
.togglebtn .line:nth-child(1) {
position: absolute;
top: 15px;
}
.togglebtn .line:nth-child(2) {
position: absolute;
top: 27px;
}
/*
设定屏幕小于768像素时的像素
*/
.navpage {
z-index: 10;
width: 100vw;
overflow: hidden;
display: flex;
height: 0vh;
transition: all 0.8s;
position: fixed;
left: 0;
top: 0;
background-color: #000;
}
.navpage .navmain {
width: 100%;
}
@media only screen and (max-width: 700px) {
.togglebtn {
display: flex;
position: relative;
z-index: 100;
}
.nav > .logo {
position: relative;
z-index: 100;
}
.togglebtn > .line {
display: block;
}
.nav > .text {
display: none;
}
.nav {
justify-content: space-between;
}
.nav > a {
width: 50px;
}
.nav .togglebtn {
order: 1;
}
.nav .logo {
order: 2;
}
.nav .buy {
order: 3;
}
#choose:checked ~ .togglebtn .line:nth-child(1) {
transform: rotate(44deg);
}
#choose:checked ~ .togglebtn .line:nth-child(2) {
transform: rotate(-43deg);
}
#choose:checked ~ .navpage {
display: flex;
/*
vw:viewport width 视窗的宽度 ==100vw =100%视窗的高度
vh:viewport height:100vh == 100% viewport height
*/
width: 100vw;
height: 100vh;
color: #fff;
position: fixed;
left: 0;
z-index: 10;
top: 0;
background-color: #000;
flex-direction: column;
padding-top: 44px;
}
.searchInput {
margin: 0px 28px;
display: flex;
justify-content: flex-start;
align-items: center;
height: 44px;
border-radius: 4px;
color: #ccc;
background-color: rgba(45, 45, 45, 0.98);
}
.searchInput .icon {
width: 32px;
height: 36px;
background-image: url(“…/imag/search.png”);
background-repeat: no-repeat;
background-position: center;
/* 设置图片背景时,一定要考虑 图片的url 位置 尺寸 重复*/
}
.searchInput input {
flex: 1;
margin: 0 10px;
height: 100%;
background: transparent;
border: none;
outline: none;
color: #fff;
}
hr {
border-color: #333;
margin-top: 15px;
}
.navList {
margin: 0 28px;
display: flex;
flex-direction: column;
justify-content: center;
}
.navList a {
width: 100%;
height: 44px;
color: #fff;
text-align: left;
line-height: 44px;
border-bottom: 1px solid #333;
}
.navList a:last-child {
border-bottom: none;
}
}
banner
@import url(“./hbanner.css”);
.banner {
display: flex;
width: 100%;
height: 580px;
background-color: #edeffe;
flex-direction: column;
justify-content: center;
align-items: center;
}
.copywarp {
flex: 2;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
text-align: center;
}
.copywarp .redapple {
margin: 20px 0;
width: 54px;
height: 67px;
background-image: url(“…/imag/applered.png”);
background-position: center;
background-repeat: no-repeat;
}
.copywarp h2 {
width: 500px;
position: inherit;
font-size: 43px;
line-height: 1.08349;
color: #1d1d1f;
padding-left: 20px;
margin-bottom: 20px;
}
.copywarp .rightlogo a {
text-decoration: none;
color: #06c;
}
.copywarp .rightlogo a:hover {
text-decoration: underline;
}
.rightlogo {
position: relative;
}
.rightlogo::before {
position: absolute;