scroll-view scrollIntoView不起作用



  • <ScrollView
    scrollY
    scrollWithAnimation='true'
    enableBackToTop='true'
    scrollIntoView='C'
    >
    <View id='A' style='height:200px;background:red'>A</View>
    <View id='B' style='height:200px;background:green'>B</View>
    <View id='C' style='height:200px;background:red'>C</View>
    <View id='D' style='height:200px;background:green'>D</View>
    <View id='E' style='height:200px;background:red'>E</View>
    <View id='F' style='height:200px;background:green'>F</View>
    <View id='G' style='height:200px;background:red'>G</View>
    <View id='H' style='height:200px;background:green'>H</View>
    <View id='I' style='height:200px;background:red'>I</View>
    <View id='J' style='height:200px;background:green'>J</View>
    </ScrollView>



  • @jingjingscroll-view scrollIntoView不起作用 中说:

    <View id='I' style='height:200px;background:red'>I</View>

    加个高度就好了


登录后回复