在看Android的文档的时候,问题有种不爽的感觉,很压抑,是什么原因呢?原来是因为文档本身的框架的上部占去了好高的一段屏幕,去基本上没有显示什么要紧的东西,只是Android的Logo和google的链接而已,这样真正显示内容的地方就变得很窄了,我宝贵的“领土”啊:
为了在开发时有个好心情,我决定“收复失地”。
修改 <sdk-home>docs/assets/android-developer-core.css
设置:
#header {
/* height: 114px; */
height: 29px; /* 缩小整个头部高度 */
position:relative;
z-index:100;
min-width:675px; /* min width for the tabs, before they wrap */
padding:0 10px;
border-bottom:3px solid #94b922;
}
#headerLeft{
/* padding: 25px 0 0; */
padding: 0px 0 0; /* 缩小头部高度 */
}
#headerLeft img{
/* add two line,隐藏 Logo */
visibility:hidden;
display:none;
height:50px;
width:180px;
}
#headerLinks {
margin:10px 10px 0 0;
height:13px;
font-size: 11px;
vertical-align: top;
/* add two lines, 隐藏右侧 Android.com 链接 */
visibility:hidden;
display:none;
}
/* 调整搜索框的大小 */
#search {
/* height:45px; */
height:29px;
/* margin:15px 10px 0 0; */
margin:0px 5px 0 0;
}
#searchForm {
/* width:350px; 如果有API levelfik 缩小搜索框的宽度,为显示 API level 预留空间
width:250px;
*/
/* 如果没有API Level 过滤器,让搜索框靠右边。*/
float:right;
}
#headerRight {
position:absolute;
right:0;
top:0;
text-align:right;
/* add one line, 加长以容纳 Search 和 API leve */
width:450px;
}
/* 使 API leve 过虑器 与 Search 在同一行上 */
#api-level-toggle {
margin: -23px 0 0 0;
}
最后还要调整一个页面高度,修改 <sdk-home>docs/assets/android-developer-docs.js, 设置:
var HEADER_HEIGHT = 29;
看看修改后的结果:
清爽很多了! 成功,呵呵