一段创建透明、无边框、园角的窗体的javascript源代码:
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>
< html >
< head >
< meta http-equiv ="Content-Type" content ="text/html; charset=iso-8859-1" >
< title > Tea Browser demo </ title >
< style >
body {
border : none ;
background-color : #FFFF99 ;
margin : 0 ;
}
</ style >
< script >
// init window
window.hostWidth = 200 ;
window.hostHeight = 200 ;
window.hostTop = 100 ;
window.hostLeft = 100 ;
window.hostBorderStyle = 0 ;
window.hostRoundCorner = 15 ;
window.hostOpacity = 0.5 ;
</ script >
</ head >
< body scroll ="no" >
< br >
< br >
< p align ="center" >
< font color ="#ff0000" >< b > Hello World </ b ></ font >< br >
This is also a web page.
</ p >
</ body >
</ html >
< html >
< head >
< meta http-equiv ="Content-Type" content ="text/html; charset=iso-8859-1" >
< title > Tea Browser demo </ title >
< style >
body {
border : none ;
background-color : #FFFF99 ;
margin : 0 ;
}
</ style >
< script >
// init window
window.hostWidth = 200 ;
window.hostHeight = 200 ;
window.hostTop = 100 ;
window.hostLeft = 100 ;
window.hostBorderStyle = 0 ;
window.hostRoundCorner = 15 ;
window.hostOpacity = 0.5 ;
</ script >
</ head >
< body scroll ="no" >
< br >
< br >
< p align ="center" >
< font color ="#ff0000" >< b > Hello World </ b ></ font >< br >
This is also a web page.
</ p >
</ body >
</ html >
说明:
- border:none;设定窗体无边框.
- <body scroll="no"> 无滚动条.
- window.hostWidth=200;窗体宽度
- window.hostHeight=200;窗体高度
- window.hostTop=100;窗体上边距
- window.hostLeft=100;窗体左边距
- window.hostBorderStyle=0;设定窗体无边框.
- window.hostRoundCorner=15;窗体圆角半径.
- window.hostOpacity=0.5;窗体透明度
以上代码需在TeaBrowser浏览器中运行。
TeaBrowser浏览器可在这里下载:
http://groups.google.com/group/teabrowser/web/TeaBrowser.zip