一个静态页面一个表格表头不动表下边上下滚动,表格高500,如果内容超过高500会出现滚动条,如果没有超过500就不会显示滚动条。这个要怎么实现。简单点的办法
两个table,每个td设定好高度第二个table 用div包起来。div设置滚动
我试过了在个人电脑上是可以的, 但在平板电脑上不行。还有什么办法可以实现呢

解决方案 »

  1.   

    ScrollView  这是一个控件吧  我写的是静态页面里面 没有这个标签啊, 可以用iframe 框架吧 
      

  2.   

    网页中的iframe就合ScrollView差不多,你试试
      

  3.   

    有使用案例没有 这个ScrollView不知道怎么用
      

  4.   

    单纯ScrollView的用法很简单,包含要出现滚动条的view就可以了,直接元素必须是一个view,如果有多个需要外派加LinearLayout等包装成一个view
    简单用法:
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"   
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"     
    android:scrollbars="vertical"
    android:fadingEdge="vertical"
    android:id="@+id/sv">
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello"
        android:textColor="#000000"
        android:paddingTop="5dip"
        android:id="@+id/tvWeatherCondition"
        android:textSize="20sp"
        />
    <ImageView 
    android:id="@+id/imgIcon"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="10dip"
    android:baselineAlignBottom="true">
    </ImageView>
    </LinearLayout>
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text=""
        android:textColor="#000000"
        android:paddingTop="5dip"
        android:id="@+id/tvWeatherInfo"
        android:textSize="20sp"
        />
    </LinearLayout>
    </ScrollView> 
      

  5.   

    非常感谢你  但我做的是静态页面  不用控件的  纯HTML 不知道还有什么办法