前话:
webkit是一个复杂的程序,复杂意味着简单,也是最基本的东西,下面是我对webkit在android中不支持scrollbar而写的文章,是说为什么不支持,以及怎么解决,我已经完全解决了这个问题。并在android 2.0中实现。 文章当初是用英文写的,因为也想让国外的朋友能读到,但没有国外的blog,也就先发在这里了。
文章并没有写全,因为最近事情比较多,我会慢慢写完。
原谅我的语法错误,拼写错误!
Jian Jun
In platform such as qt , webkit support scrollbar , as well as google’s chrom ,which use webkit as it’s web enghine . but google’s another system ,android, haven’t support scroll bar . it just let the overflow area big enough to show all the things in the scroll bar . in this text , I will show you how to add some code to webkit to let android do support scroll bar. here we go.
Scroll bar comes from css tags “overflow”. Bellow it is a html text.
it’s DIV ‘css attribute is define at style mydiv , it show that , the div area in the html page , which is a square area ,with width of 100px , height of 100px,it’s border is line of style solid red . after it overflow attribute , it’s define as “scroll” , which mean , if the div tag have some child html tags ,and child tags is too big to let div to hold it in it’s area which is 100*100 at the example ,the div will show a scroll bar , so user can use it to view all of it child . the overflow have some other attribute , we don’t show dettel it at here , cause just it’s “scroll” value will generate a scroll bar .
.mydiv {
width: 100px;
height: 100px;
border: solid red;
border-width: 3px;
overflow:scroll
}