老师弄完的效果不对啊

老师弄完的效果不对啊

<view class="header">

  <input type="textclass="header-inputplaceholder="我的第一个小程序placeholder-class="header-input-placeholderbindinput="handleInputChange" />

  <icon type="searchclass="header-input-iconsize="15wx:if="{{showIcon}}"></icon>

</view>

<!-- <audio src="https://www.ytmp3.cn/down/76567.mp3" controls="false" name="等你归来" author="程响"poster="../../resources/微信图片_20220413215634.jpg" ></audio> -->

<view class="navigator">

  <view class="navigator-item">


    <image class="navigator-imgsrc="../../resources/recommend.png"></image>

    推荐

    <view class="navigator-acitve" />

  </view>

</view>

<view class="navigator-item">

  <image class="navigator-imgsrc="../../resources/path.png"></image>

  路径

</view>

<view class="navigator-item">

  <image class="navigator-imgsrc="../../resources/project.png"></image>

  路径

</view>

<view class="navigator-item">

  <image class="navigator-imgsrc="../../resources/activity.png"></image>

  活动

</view>


<swiper previous-margin="18rpxnext-margin="18rpxcircular="{{}}" autoplay="{{}}" class="swiper">

  <swiper-item class="swiper-item">

    <image class="swiper-imagesrc="../../resources/轮播图 (1).png"></image>

  </swiper-item>

</swiper>

<swiper-item class="swiper-item">

  <image class="swiper-imagesrc="../../resources/轮播图 (1).jpg"></image>

</swiper-item>


<swiper-item class="swiper-item">

  <image class="swiper-imagesrc="../../resources/轮播图 (2).png"></image>

</swiper-item>


<view class="project">


  <text class="project-title">实战推荐</text>

    <view class="projecr-item">

      <image class="projecr-item-picsrc="../../resources/1 (1).jpg"></image>

      <view class="projecr-item-content">

        <view class="projecr-item-title">

          微信小程序入门与实战常用组件 开发技巧API 项目实战</view>

        <view class="projecr-item-tags">

          <text class="project-item--price-active">198</text>

          <text class="projecr-item-price">198</text>

          <text class="projecr-item-notice">app购物买立减 3</text>

          <text class="projecr-item-text">APP购物买立减</text>

          <text>

          <image class="projecr-item-user"

          src="../../resources/my-active.png"

          ></image>

          </text>

        </view>

      </view>

    </view>

</view>

.userinfo {

  display: flex;

  flex-direction: column;

  align-items: center;

  color: #aaa;

}


.userinfo-avatar {

  overflow: hidden;

  width: 128rpx;

  height: 128rpx;

  margin: 20rpx;

  border-radius: 50%;

}


.usermotto {

  margin-top: 200px;

}

.header-input{

  line-height: 72rpx;

  padding:  0 36rpx;

  margin: 22rpx 36rpx 14rpx 36rpx;

  border: 1px solid #D9DDE1;

  border-radius: 36rpx;

  text-align: center;

  font-size: 26rpx;


}

header-input-placeholder{

  color: rgba(133,133, 133, 0.60);

  

}

.header{

  position: relative;

}

.header-input-icon{

  position: absolute;

  left: 25%;

  top: 14rpx;

  transform: translateX(-184

  rpx);

  color: rgba(133,133, 133, 0.60);

}

.navigator{

  display: flex;

  line-height: 112rpx;

  margin-bottom: 6rpx;

}

.navigator-item{

  flex:1 ;

  text-align: center;

  vertical-align: middle;

  font-size: 32rpx;

  color: #2B333B;

}

.navigator-img{

  position: relative;

  top: 8rpx;

  width: 36rpx;

  height: 36rpx;

}

.navigator-acitve{

  width: 32rpx;

  height: 8rpx;

  border-radius: 4rpx;

  position: absolute;

  background: #f01414;

  left: 90rpx;

  bottom: 20rpx;


}

.swiper-image{

  border-radius: 12rpx;

  width: 708rpx;

  height: 234rpx;

}

.swiper-item{

box-sizing: border-box;

padding: 0 6rpx;

}

.swiper{

  height: 234rpx;

}

.projecr{

   margin-top: 32rpx;

   margin-left: 40rpx

}

.projecr-title{


  font-size: 28rpx;

  color:#2B333B ;

  font-weight: bold;

  line-height: 32rpx;

}

.projecr-item{

  display: flex;

  margin-top: 16rpx;

}

.projecr-item-pic{

  width: 208rpx;

  height: 136rpx;

  border-radius: 16rpx;

}

.projecr-item-content{

  flex: 1;

  margin-left: 24rpx;

  border-bottom:  1rpx solid #D9DDE1;

}

https://img1.sycdn.imooc.com//climg/6257f1fd099598c905290851.jpg


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕久久 2022-04-14 18:14:45

同学你好,代码有如下问题:

1、如下位置,wxml结构不对:

https://img1.sycdn.imooc.com//climg/6257f30909c6c3f704170060.jpg

修改如下:

https://img1.sycdn.imooc.com//climg/6257f34709b255c806700355.jpg

2、轮播图,结构也不对,修改如下:

https://img1.sycdn.imooc.com//climg/6257f3da090376e610050402.jpg

祝学习愉快!

  • 提问者 球球不一般 #1

    <view class="navigator">

      <view class="navigator-item">


        <image class="navigator-imgsrc="../../resources/recommend.png"></image>

        推荐

        <view class="navigator-acitve" />

      </view>

    </view>

    <view class="navigator-item">

      <image class="navigator-imgsrc="../../resources/path.png"></image>

      路径

    </view>

    <view class="navigator-item">

      <image class="navigator-imgsrc="../../resources/project.png"></image>

      路径

    </view>

    <view class="navigator-item">

      <image class="navigator-imgsrc="../../resources/activity.png"></image>

      活动

    </view>

    </view>

    <swiper previous-margin="18rpxnext-margin="18rpxcircular="{{}}" autoplay="{{}}" class="swiper">

      <swiper-item class="swiper-item">

        <image class="swiper-imagesrc="../../resources/轮播图 (1).png"></image>

      </swiper-item>


    <swiper-item class="swiper-item">

      <image class="swiper-imagesrc="../../resources/轮播图 (1).jpg"></image>

    </swiper-item>


    <swiper-item class="swiper-item">

      <image class="swiper-imagesrc="../../resources/轮播图 (2).png"></image>

    </swiper-item>

    </swiper>


    2022-04-14 20:10:35
  • 提问者 球球不一般 #2

    https://img1.sycdn.imooc.com//climg/62580f4c09881a6505300540.jpg

    2022-04-14 20:10:57
  • 提问者 球球不一般 #3

    改完还报错

    2022-04-14 20:11:57
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师