2007-7-7 14:23
火龍之混血兒
Xanga 捲軸使用教學
[b]1.基本設定[/b][b][u]
Header[/u][/b]
<style>
body{
scrollbar-arrow-color: #000000;
scrollbar-3dlight-color: #999999;
scrollbar-highlight-color: #ffffff;
scrollbar-face-color: #999999;
scrollbar-track-color: #cccccc;
scrollbar-shadow-color: #666666;
scrollbar-darkshadow-color: #000000;
}
</style>
[u][color=#4286c6][b]Remarks[/b][/color][/u]
[color=#808080][img=267,221]http://kkx3.net/xanga/scrollbar.jpg[/img]
[color=Black][b]2.變色[/b][/color][b][u]
Header[/u][/b]
[color=#808080]<script language="JavaScript">
<!--
colours = new Array('#000000', '#999999', '#6699ff', '#fcc0e5', '#ff409f', '#cc99ff')
function flash()
{
var clrPos = Math.floor(Math.random() * colours.length)
with(window.document.body.style)
{
scrollbarFaceColor = document.bgColor;
scrollbarTrackColor = document.bgColor;
scrollbarArrowColor = colours[clrPos];
scrollbarHighlightColor = document.bgColor;
scrollbar3dLightColor = colours[clrPos];
scrollbarShadowColor = document.bgColor;
scrollbarDarkShadowColor = colours[clrPos];
borderWidth = 2;
borderStyle = 'solid';
borderColor = colours[clrPos];
}
}
if (document.all)window.document.body.onscroll = flash;
//-->
</script>
[/color][/color][color=#808080]remarks:
color 方面, 可就自己的喜好, 加多或減少,
只需要加多數個 '# ' 即可
border 可用 solid / dotted / dashed / double / groove / ridge / inset / outset
document.bgColor 即是你首頁的 background color
colours[clrPos] 即其中一種你輸入 color
如果想變色o既部分唔同顏色, 你可以...
example: [/color]
[color=#808080]scrollbarFaceColor = document.bgColor;
scrollbarTrackColor = document.bgColor;
scrollbarArrowColor = colours[clrPos+[color=Red]1[/color]];
scrollbarHighlightColor = colours[clrPos];
scrollbar3dLightColor = colours[clrPos+[color=Red]2[/color]];
scrollbarShadowColor = colours[clrPos];
scrollbarDarkShadowColor = colours[clrPos+[color=Red]3[/color]];
[/color]3.在 subscriptions list 加一條 scroll bar[b][u][color=#4286c6]Website stat[/color][/u][/b]
[color=#808080]<script type="text/javascript">
function adjustSirListHeight()
{
var sirListHeight = '90px';
var allTables = document.getElementsByTagName('tbody');
for (i=0; i < allTables.length; i++)
{
if ((allTables[i].innerHTML.indexOf('Sites I Read') != -1) &&
(allTables[i].innerHTML.toUpperCase().indexOf('<TABLE') == -1))
{
sirlist = allTables[i].lastChild;
temp = sirlist.firstChild.innerHTML;
sirlist.removeChild(sirlist.firstChild);
td = document.createElement('td');
div = document.createElement('div');
div.style.width = '165px';
div.style.height = sirListHeight;
div.style.overflow = 'auto';
div.innerHTML = temp;
td.appendChild(div);
sirlist.appendChild(td);
break;
}
}
}
if (navigator.userAgent.indexOf('Mac') == -1)
if ((document.URL.indexOf('weblogs') == -1) &&
(document.URL.indexOf('guestbook') == -1) &&
(document.URL.indexOf('events') == -1) &&
(document.URL.indexOf('reviews') == -1))
adjustSirListHeight();
</script>
[/i][/i][/i][/color][i][i][i]4.SHOW不了日記內容時加入捲軸[b][u][color=#4286c6]在日記表edit html
[/color][/u][/b]
[color=#808080]
<DIV style="OVERFLOW-Y: scroll; HEIGHT: 340px;" border="0">
<;pre>
日記內容
</pre>
</div>
[/color]
5.個人資料加scrollbar code[b][u][color=#4286c6]Website stat[/color][/u][/b]
[color=#808080]<script type="text/javascript">
function adjustSirListHeight()
{
// 高度
var sirListHeight = '120px';
var allTables = document.getElementsByTagName('tbody');
for (i=0; i < allTables.length; i++)
{
if ((allTables[i].innerHTML.indexOf('Profile') != -1) &&
(allTables[i].innerHTML.toUpperCase().indexOf('<TABLE') == -1))
{
sirlist = allTables[i].lastChild;
temp = sirlist.firstChild.innerHTML;
sirlist.removeChild(sirlist.firstChild);
td = document.createElement('td');
div = document.createElement('div');
div.style.width = '190px';
div.style.height = sirListHeight;
div.style.overflow = 'auto';
div.innerHTML = temp;
td.appendChild(div);
sirlist.appendChild(td);
break;
}
}
}
if (navigator.userAgent.indexOf('Mac') == -1)
if ((document.URL.indexOf('weblogs') == -1) &&
(document.URL.indexOf('guestbook') == -1) &&
(document.URL.indexOf('events') == -1) &&
(document.URL.indexOf('reviews') == -1))
adjustSirListHeight();
</script>
[/i][/i][/i][/color][i][i][i]6.Blogrings加scrollbar code[b][u][color=#4286c6]Website stat[/color][/u][/b][color=#808080]
<script type="text/javascript">
function adjustSirListHeight()
{
//請自行修改高度
var sirListHeight = '200px';
var allTables = document.getElementsByTagName('tbody');
for (i=0; i < allTables.length; i++)
{
if ((allTables[i].innerHTML.indexOf('Blogrings') != -1) &&
(allTables[i].innerHTML.toUpperCase().indexOf('<TABLE') == -1))
{
sirlist = allTables[i].lastChild;
temp = sirlist.firstChild.innerHTML;
sirlist.removeChild(sirlist.firstChild);
td = document.createElement('td');
div = document.createElement('div');
div.style.width = '190px';
div.style.height = sirListHeight;
div.style.overflow = 'auto';
div.innerHTML = temp;
td.appendChild(div);
sirlist.appendChild(td);
break;
}
}
}
if (navigator.userAgent.indexOf('Mac') == -1)
if ((document.URL.indexOf('weblogs') == -1) &&
(document.URL.indexOf('guestbook') == -1) &&
(document.URL.indexOf('events') == -1) &&
(document.URL.indexOf('reviews') == -1))
adjustSirListHeight();
</script>
[size=2][/size][/i][/i][/i][/color][/i][/i][/i][/i][/i][/i]
[[i] 本帖最後由 火龍之混血兒 於 2007-7-7 14:28 編輯 [/i]]