“21天好习惯“ 第十八期 — 18之黑马面面移动端布局(四)

本文介绍了黑马程序员pink老师的移动端布局项目,采用flexible.js、rem和flex布局实现。项目包括index.css、index.less、normalize.css、swiper.min.css等文件。同时提供了图标、图片和JavaScript资源的下载链接,鼓励读者动手实践。
摘要由CSDN通过智能技术生成

效果设计图!!!
效果设计图!!! 项目来源:黑马程序员的pink老师 点击跳转视频课程
效果设计图!!! 此项目布局采用flexible.js+rem+flex
在这里插入图片描述


本博客目前搭建效果(有兴趣的同学可以一起来动手)
效果设计图!!!
效果设计图!!! 项目来源:黑马程序员的pink老师 点击跳转视频课程
效果设计图!!! 此项目布局采用flexible.js+rem+flex


本博客目前搭建效果(有兴趣的同学可以一起来动手)
在这里插入图片描述
在这里插入图片描述

关于路径的问题和部分文件示意图如下:(less文件为css的预编译文件,可视为css的同分异构体)
在这里插入图片描述


css

index.css

body {
   
  min-width: 320px;
  max-width: 750px;
  margin: 0 auto;
  background-color: #f2f4f7;
}
@media screen and (min-width: 750px) {
   
  html {
   
    font-size: 37.5px !important;
  }
}
.header {
   
  height: 2.133333rem;
  border-bottom: 1px solid #EAEAEA;
  text-align: center;
  line-height: 2.133333rem;
  font-size: 0.933333rem;
  color: #1C1C1C;
}
.top {
   
  background-color: #FFF;
  padding-bottom: 1.2rem;
}
.nav {
   
  display: flex;
  flex-wrap: wrap;
  padding: 1.173333rem 0 1.6rem 0;
}
.nav .items {
   
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 33.3%;
}
.nav .items img {
   
  width: 3.706666rem;
  height: 3.706666rem;
}
.nav .items span {
   
  font-size: 0.72rem;
  color: #707070;
}
.nav .items:nth-child(-n+3) {
   
  margin-bottom: 1.6rem;
}
.go {
   
  padding: 0 0.373333rem;
}
.content {
   
  width: 100%;
  margin: 0.266666rem 0;
  padding: 1.066666rem 0.533333rem;
  background-color: #FFF;
}
.content .conHead {
   
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.906666rem;
  height: 1.066666rem;
  width: 100%;
  line-height: 1.066666rem;
}
.content .conHead h4 {
   
  margin: 0;
  font-size: 0.746666rem;
  color: #333333;
}
.content .conHead h4::before {
   
  content: '';
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.533333rem 0 0;
  width: 1.066666rem;
  height: 1.066666rem;
  background: url("../icons/i2.png") no-repeat;
  background-size: 100% 100%;
}
.content .conHead .conCharge::before {
   
  background: url("../icons/i1.png") no-repeat;
  background-size: 100% 100%;
}
.content .conHead a {
   
  font-size: 0.586666rem;
  color: #999999;
}
.content .conBody {
   
  position: relative;
}
.content .conBody .swiper-container {
   
  width: 14.4rem;
  height: 100%;
}
.content .conBody .swiper-slide {
   
  text-align: center;
  font-size: 18px;
  background: #fff;
  /* Center slide text vertically */
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
  transition: 300ms;
  transform: scale(0.8);
  opacity: 0.6;
}
.content .conBody .swiper-slide a {
   
  width: 9.013333rem;
  height: 10.026666rem;
}
.content .conBody .swiper-slide a img {
   
  width: 100%;
  height: 100%;
}
.content .conBody .swiper-slide p {
   
  margin-top: 0.64rem;
  width: 9.013333rem;
  line-height: 1.066666rem;
  font-size: 0.666666rem;
  color: #333333;
}
.content .conBody .swiper-slide-active,
.content .conBody .swiper-slide-duplicate-active {
   
  transform: scale(1);
  z-index: 99;
  opacity: 1;
}
.content .conStudy {
   
  width: 100%;
  margin-bottom: 1.6rem;
  overflow: hidden;
}
.content .conStudy .swiper {
   
  padding: 0.266666rem;
  width: 100%;
  height: 100%;
}
.content .conStudy .swiper-slide {
   
  width:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值