Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

高度不够的话为什么上面的元素会不显示呢?

已经有滚动条了 但是内容为1111的元素会看不到 如图就是滚动到最顶端的样子 下面的可以显示完全 但是上面的看不到 这是怎么回事
image

<view class="area1List" wx:if="{{true}}">
                      <view>11111</view>
                      <view>11111</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>3333</view>
                      <view>4444</view>
                      <view>4444</view>
                      <view>4444</view>
                      <view>4444</view>
</view>
.area1List{
  display: flex;
  flex-direction: column;
  position: absolute;
  width:222rpx;
  justify-content: center;
  background-color: orange;
  z-index: 9999999999;
  font-size: 26rpx;
  height: 500rpx;
  top: 0rpx;
  overflow: scroll;
}
.area1List view{
  display: flex;
  width: 222rpx;
  justify-content: center;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

area1List 绝对定位去掉 或者 top:0 试试看咯


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...