//原文
例<body style="filter:progid:DXImageTransform.Microsoft.Gradient(gradientType='0',startColorstr='#00ffcc00',endcolorstr='#c099ccff')
">
注:
gradientType 可以是 1或是0
startcolorstr 开始的颜色
endcolorstr 结束的颜色
颜色是Alpha+color所得
Alpha=00|20|50|a0|c0|ff
颜色动态的变化
在head前加上
<script language="JavaScript">
<!--
var m=250;
var s=-5;
var mycol;
var timeID=0;
function aa()
{
m=m+s;
mycol=m.toString(16);
if(m<16)
mycol="0"+mycol;
mybg.filters.item('DXImageTransform.Microsoft.Gradient').StartColorStr="#"+mycol+"8888";
mybg.filters.item('DXImageTransform.Microsoft.Gradient').EndColorStr="#88"+mycol+"88";
if(m>245)
s=-Math.abs(s);
if(m<10)
s=Math.abs(s);
timeID=setTimeout("aa()",100);
}
//-->
</script>
然後
<body id="mybg" style="FILTER:
progid:DXImageTransform.Microsoft.Gradient(startColorstr=#ffffff,endColorstr=#000000,GradientType=0)"
OnLoad="aa()">
---------------------------------------------------------------------------------------------------------------------------------------------------
<style>
.a
{
BORDER:#bfceff 1px solid;
height:18;FILTER:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr='#ddecfb',endColorStr='#ffffff');
width:180;
}
.b
{
BORDER: #bfceff 1px solid;
PADDING-TOP: 10px;
PADDING-LEFT: 10px;
FONT-SIZE: 12px;
HEIGHT: 100px;
width:180;
border-top:0;
}
</style>
<div class="a"> </div>
<div class="b"> </div>
收藏的几个漂亮的button
<style>
.btn {
BORDER-RIGHT: #7b9ebd 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#7b9ebd 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#ffffff, EndColorStr=#cecfde); BORDER-LEFT: #7b9ebd 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#7b9ebd 1px solid
}
.btn1_mouseout {
BORDER-RIGHT: #7EBF4F 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#7EBF4F 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#ffffff, EndColorStr=#B3D997); BORDER-LEFT: #7EBF4F 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#7EBF4F 1px solid
}
.btn1_mouseover {
BORDER-RIGHT: #7EBF4F 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#7EBF4F 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#ffffff, EndColorStr=#CAE4B6); BORDER-LEFT: #7EBF4F 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#7EBF4F 1px solid
}
.btn2 {padding: 2 4 0
4;font-size:12px;height:23;background-color:#ece9d8;border-width:1;}
.btn3_mouseout {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#2C59AA 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#ffffff, EndColorStr=#C3DAF5); BORDER-LEFT: #2C59AA 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#2C59AA 1px solid
}
.btn3_mouseover {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#2C59AA 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#ffffff, EndColorStr=#D7E7FA); BORDER-LEFT: #2C59AA 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#2C59AA 1px solid
}
.btn3_mousedown
{
BORDER-RIGHT: #FFE400 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#FFE400 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#ffffff, EndColorStr=#C3DAF5); BORDER-LEFT: #FFE400 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#FFE400 1px solid
}
.btn3_mouseup {
BORDER-RIGHT: #2C59AA 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#2C59AA 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#ffffff, EndColorStr=#C3DAF5); BORDER-LEFT: #2C59AA 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#2C59AA 1px solid
}
.btn_2k3 {
BORDER-RIGHT: #002D96 1px solid; PADDING-RIGHT: 2px; BORDER-TOP:
#002D96 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER:
progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
StartColorStr=#FFFFFF, EndColorStr=#9DBCEA); BORDER-LEFT: #002D96 1px
solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM:
#002D96 1px solid
}
</style>
转摘请注明出处 http://blog.csdn.net/juwuyi
<button class=btn title="这是CSDN的官方按钮"> 好看的CSDN Button</button><P></p>
<button
class=btn1_mouseout onmouseover="this.className='btn1_mouseover'"
onmouseout="this.className='btn1_mouseout'"
title="这是JoeCom(juwuyi)的原创按钮 Joecom'sblog:http://blog.csdn.net/juwuyi"
> 好看的Green Button</button>
<button
class=btn1_mouseout onmouseover="this.className='btn1_mouseover'"
onmouseout="this.className='btn1_mouseout'" DISABLED
> 好看的Green Button</button>
<P>
<button class=btn2 title="这是e商2003的官方按钮"> 好看的 e商2003 Button</button>
<P>
<button class=btn3_mouseout onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"
title="这是JoeCom(juwuyi)的原创按钮 Joecom'sblog:http://blog.csdn.net/juwuyi"
> 好看的QQ Button</button>
<P>
<button class=btn_2k3 title="这是JoeCom(juwuyi)的原创按钮
Joecom'sblog:http://blog.csdn.net/juwuyi"> 好看的 2k3 Button</button>
<TABLE style="TABLE-LAYOUT: fixed" height=28 cellSpacing=0
cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=3 width="100%">
<TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0
cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=1>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD bgColor=#908a47></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#908a47 colSpan=2></TD>
<TD bgColor=#f7f8f9></TD>
<TD bgColor=#908a47 colSpan=2></TD>
<TD></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#908a47></TD>
<TD bgColor=#f7f8f9 colSpan=3></TD>
<TD bgColor=#908a47></TD>
<TD></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD> <TABLE style="TABLE-LAYOUT: fixed" height="100%" cellSpacing=0
cellPadding=0 border=0>
<TBODY>
<TR>
<TD width=1 bgColor=#908a47></TD>
<TD id=oINNER bgColor=#f7f8f9> </TD>
<TD width=1 bgColor=#908a47></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR height=3 width="100%">
<TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0
cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=1>
<TD width=1></TD>
<TD width=1 bgColor=#908a47></TD>
<TD width=1 bgColor=#f7f8f9></TD>
<TD bgColor=#f7f8f9></TD>
<TD width=1 bgColor=#f7f8f9></TD>
<TD width=1 bgColor=#908a47></TD>
<TD width=1></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#908a47 colSpan=2></TD>
<TD bgColor=#f7f8f9></TD>
<TD bgColor=#908a47 colSpan=2></TD>
<TD></TD>
</TR>
<TR height=1>
<TD colSpan=3></TD>
<TD bgColor=#908a47></TD>
<TD colSpan=3></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
------------------------------------
通过最外层table的width可以控制宽度
通过分别修改其中的颜色值可以控制边框颜色及背景颜色
===================================================================================
转自http://blog.csdn.net/asthlon/archive/2004/09/28/119209.aspx
GreetingCardDesinger
<html>
<head>
<title>Greeting Card Designer-www.51windows.Net
<style type="text/css">
.title { font-family: Verdana;
font-size: 13pt; font-weight: bold;
color: #FFFFFF;}
.lpane { position:absolute;
width:144px; height:408px; z-index:1;
top: 34px; left: 6px;
background: #FFFFFF;
border-right:2px solid #99CCFF;
border-top:2px solid #333366;
border-left:2px solid #333366;
border-bottom:2px solid #99CCFF;}
.layout { position:absolute;
width:443px; height:408px; z-index:1;
top: 34px; left: 157px;
background-color: #999999;
border-right:2px solid #99CCFF;
border-top:2px solid #333366;
border-left:2px solid #333366;
border-bottom:2px solid #99CCFF;}
.card { position:absolute;
width:375px; height:225px; z-index:2;
left: 32px; top: 85px;
background-color: #FFFFFF;
layer-background-color: #FFFFFF;
border: 1px solid #000000; padding:15;
overflow:hidden;}
.cardshadow { position:absolute;
width:375px; height:225px; z-index:1;
left: 32px; top: 85px;
background: #000000; border: 1px solid #000000;
FILTER: progid:DXImageTransform.Microsoft.CrBlur(
PixelRadius=3,
MakeShadow=true,
ShadowOpacity=.30);}
.rpane { position:absolute;
width:144px; height:408px; z-index:1;
top: 34px; left: 608px;
background:#666666;
layer-background-color: #FFFFFF;
border-right:2px solid #99CCFF;
border-top:2px solid #333366;
border-left:2px solid #333366;
border-bottom:2px solid #99CCFF;
padding:5px;}
.bar { position:absolute;
width:746px; height:20px; z-index:2;
top: 446px; left: 6px; padding:5px;}
.bar A:link {text-decoration:none; color:white}
.bar A:visited {text-decoration:none; color:white}
.bar A:active {text-decoration:none; color:white}
.bar A:hover {text-decoration:none; color:yellow}
.wbox{ background-color: #FFFFFF;
border:1px solid #000000; z-index:2;}
.button1{ height:20px;
background:#666666;
font-family:verdana; color:white;
font-size:8pt; font-weight:bold;
padding:1px; padding-left:5px;
border-bottom:1px solid #999999;
cursor:hand; }
.textRegion{ height:20px;
background:#666666;
font-family:verdana; color:white;
font-size:8pt;
padding:1px; padding-left:5px;
border-bottom:1px solid #999999;}
.swatch{ height:20px; width:20px;
margin:5px; border:1px solid black;
cursor:hand;}
</style>
<SCRIPT language=javascript>
<!-- Identifies the current set of active right pane controls -->
var gsCurrentControlSet = null;
<!-- These variables are used to dynamically assign IDs to inserted content -->
var giLastImg = '1';
var giLastTxt = '1';
<!-- The fnInit function initializes the editable and non-editable regions -->
<!-- of the document -->
function fnInit(){
gsCurrentControlSet=oSizeControls;
<!-- Ensure the display interface is not selectable, by making all -->
<!-- elements UNSELECTABLE -->
for (i=0; i<document.all.length; i++)
document.all(i).unselectable = "on";
<!-- Prepare the editable region -->
card.unselectable = "off";
card.contentEditable='true';
document.execCommand("2D-Position", true, true);
document.execCommand("MultipleSelection", true, true);
document.execCommand("LiveResize", true, true);
}
<!-- The fnToggleOptions function sets the type of controls available on -->
<!-- the right pane of the Card Designer. size/background/text/images -->
function fnToggleOptions(sControlSet){
if (gsCurrentControlSet != sControlSet){
gsCurrentControlSet.style.display = "none";
sControlSet.style.display = "block";
gsCurrentControlSet = sControlSet;
}
}
<!-- The fnChangeSize function sets the editable card region -->
<!-- to the user selected dimentions. -->
function fnChangeSize(oWidth, oHeight, oTop, oLeft) {
card.style.width=oWidth;
cardshadow.style.width=oWidth;
card.style.height=oHeight;
cardshadow.style.height=oHeight;
card.style.top=oTop;
cardshadow.style.top=oTop;
card.style.left=oLeft;
cardshadow.style.left=oLeft;
}
<!-- The fnChangeStyle function sets the background style for the card. -->
function fnChangeStyle() {
if (event.srcElement.className == "swatch") {
card.style.background=event.srcElement.style.background;
card.style.filter=event.srcElement.style.filter;
}
}
<!-- The fnInsertImage function inserts an image into the editable card -->
<!-- region. The new IMG has a unique ID. -->
function fnInsertImage(oImgId,oImgSrc)
{
var oNode=document.createElement("img");
card.insertBefore(oNode);
oNode.src=oImgSrc;
giLastImg++;
var iTempCount = oImgId + giLastImg;
oNode.id = iTempCount;
oNode.style.position='absolute';
<!-- Set the new image as control selected for resizing/repositioning -->
var oControlRange = document.body.createControlRange();
oControlRange.add(oNode);
oControlRange.select();
}
<!-- The fnInsertText function inserts an text DIV into the editable card -->
<!-- region. The new DIV has a unique ID. -->
function fnInsertText(oTxtId,oTxtFont) {
var oNode=document.createElement("div");
card.insertBefore(oNode);
oNode.style.fontFamily=oTxtFont;
oNode.innerText='Enter some text here';
giLastTxt++;
var iTempCount = "text" + giLastTxt;
oNode.id = iTempCount;
oNode.style.position='absolute';
<!-- Set the new text as the active element for editing. -->
oNode.setActive()
}
<!-- The fnChangeFontSize function sets the font-size for control selected -->
<!-- text regions. -->
function fnChangeFontSize(){
if (document.selection.type == "Control") {
var oControlRange = document.selection.createRange();
for (i = 0; i < oControlRange.length; i++)
if (oControlRange(i).tagName != "IMG")
oControlRange(i).style.fontSize=event.srcElement.style.fontSize;
}
}
<!-- The fnChangeFontFamily function sets the font-family for control -->
<!-- selected text regions. -->
function fnChangeFontFamily (){
if (document.selection.type == "Control"){
var oControlRange = document.selection.createRange();
for (i = 0; i < oControlRange.length; i++)
if (oControlRange(i).tagName != "IMG")
oControlRange(i).style.fontFamily=event.srcElement.style.fontFamily;
}
}
<!-- The fnChangeFontColor function sets the text color for control selected -->
<!-- text regions. -->
function fnChangeFontColor (){
if (document.selection.type == "Control") {
var oControlRange = document.selection.createRange();
for (i = 0; i < oControlRange.length; i++)
if (oControlRange(i).tagName != "IMG")
oControlRange(i).style.color=event.srcElement.style.backgroundColor;
}
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#006699" MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0"
LEFTMARGIN="0" onload="fnInit();">
<!--TOOLBAR_START--><!--TOOLBAR_EXEMPT--><!--TOOLBAR_END-->
<DIV ID="title" CLASS="title" STYLE="position:absolute; width:747px;
height:28px; z-index:2; top:5px; left:5px">Greeting Card Designer</DIV>
<!-- Option Control -->
<DIV ID="leftpane" CLASS="lpane">
<DIV CLASS="button1" onclick="fnToggleOptions(oSizeControls);">
Size</DIV>
<DIV CLASS="button1" onclick="fnToggleOptions(oBackgroundControls);">
Background Style</DIV>
<DIV CLASS="button1" onclick="fnToggleOptions(oTextControls);">
Text</DIV>
<DIV CLASS="button1" onclick="fnToggleOptions(oImageControls);">
Images</DIV>
</BR></BR></BR></BR>
<DIV CLASS="textRegion">
</BR></BR></BR></BR>Right-click <B>here</B> and select
<B>View Source</B> to see how it's done.</BR></BR></BR></BR></BR></DIV>
</DIV>
<!-- The Editing Container -->
<DIV ID="layoutbox" CLASS="layout">
<DIV ID="card" CLASS="card" onpaste="window.event.returnValue = false;" >
</DIV>
<DIV ID="cardshadow" CLASS="cardshadow">
</DIV>
</DIV>
<!-- Size Controls -->
<DIV ID="oSizeControls" CLASS="rpane" ALIGN="center" STYLE="display:block;">
<DIV ALIGN="left" STYLE="font-family:verdana; color:white;
font-size:10pt; padding:1px; font-weight:bold">Size:</DIV>
<DIV ALIGN="left" STYLE="font-family:verdana; color:white;
font-size:8pt; padding:5px">Choose the dimensions of your
card by clicking on a size below:</DIV>
<BR>
<DIV ID="cardsize1" CLASS="wbox" STYLE="width:100; height:65;
padding:5px; margin:10px; cursor:hand;"
onclick="fnChangeSize('375','225','85','32');" >4" x 6"</DIV>
<DIV ID="cardsize2" CLASS="wbox" STYLE="width:100; height: 100;
padding:5px; margin:10px; cursor:hand;"
onclick="fnChangeSize('375','375','5','32');">6" x 6"</DIV>
<DIV ID="cardsize3" CLASS="wbox" STYLE="width:70; height: 100;
padding:5px; margin:10px; cursor:hand;"
onclick="fnChangeSize('275','375','8','75');">6" x 4"</DIV>
</DIV>
<!-- Text Controls -->
<DIV ID="oTextControls" CLASS="rpane" ALIGN="left"
STYLE="display:none; padding:5px">
<DIV ALIGN="left" STYLE="font-family:verdana; color:white;
font-size:10pt; padding:1px; font-weight:bold">Text:</DIV>
<DIV ALIGN="left" STYLE="font-family:verdana; color:white;
font-size:8pt; padding:5px">Insert, edit, or reposition text regions.
</DIV><BR/>
<button onclick="fnInsertText('georgia')">Insert Text</button><BR/>
<!-- Text Size Controls -->
<SPAN onclick="fnChangeFontSize();">
<DIV STYLE="height: 25px; cursor:hand; font-family:georgia;
font-size:22pt; font-weight:normal; color:white">Large</DIV>
<DIV STYLE="height: 25px; cursor:hand; font-family:georgia;
font-size:15pt; font-weight:normal; color:white">Medium</DIV>
<DIV STYLE="height: 25px; cursor:hand; font-family:georgia;
font-size:10pt; font-weight:normal; color:white">small</DIV>
</SPAN><BR/>
<!-- Text Font-Family Controls -->
<SPAN onclick="fnChangeFontFamily();">
<DIV STYLE="height: 25px; cursor:hand; font-family:times;
font-size:14pt; font-weight:normal; color:white">Times</DIV>
<DIV STYLE="height: 25px; cursor:hand; font-family:arial;
font-size:14pt; font-weight:normal; color:white">Arial</DIV>
<DIV STYLE="height: 25px; cursor:hand; font-family:georgia;
font-size:14pt; font-weight:normal; color:white">Georgia</DIV>
<DIV STYLE="height: 25px; cursor:hand; font-family:verdana;
font-size:14pt; font-weight:normal; color:white">Verdana</DIV>
</SPAN><BR/>
<!-- Text Color Controls -->
<SPAN onclick="fnChangeFontColor();">
<SPAN CLASS="swatch" STYLE="background:black">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:#666666">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:#cccccc">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:white">
</SPAN><BR/>
<SPAN CLASS="swatch" STYLE="background:tomato">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:palegreen">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:palegoldenrod">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:royalblue">
</SPAN>
</SPAN>
</DIV>
<!-- Image Controls -->
<DIV ID="oImageControls" CLASS="rpane" ALIGN="center"
STYLE="display:none; padding:5px; overflow:auto">
<DIV ALIGN="left" STYLE="font-family:verdana; color:white;
font-size:10pt; padding:1px; font-weight:bold">Images:</DIV>
<DIV ALIGN="left" STYLE="font-family:verdana; color:white; font-size:8pt;
padding:5px">Select image to insert, then position or re-size.</DIV>
<DIV STYLE="height:65px; width: 100px; border-bottom:1px solid #cccccc;
padding:10px; cursor:hand"
onclick="fnInsertImage('heart','heart.gif');">
<IMG SRC="miniheart.gif" STYLE="position:absolute; left:50"
ondrag="window.event.returnValue = false;"/></DIV>
<DIV STYLE="height:65px; width: 100px; border-bottom:1px solid #cccccc;
padding:10px; cursor:hand"
onclick="fnInsertImage('egg','egg.gif');">
<IMG SRC="miniegg.gif" STYLE="position:absolute; left:50"
ondrag="window.event.returnValue = false;"/></DIV>
<DIV STYLE="height:65px; width: 100px; border-bottom:1px solid #cccccc;
padding:10px; cursor:hand"
onclick="fnInsertImage('flower','flower.gif');">
<IMG SRC="miniflower.gif" STYLE="position:absolute; left:50"
ondrag="window.event.returnValue = false;"/></DIV>
<DIV STYLE="height:65px; width: 100px; border-bottom:1px solid #cccccc;
padding:10px; cursor:hand"
onclick="fnInsertImage('present','present.gif');">
<IMG SRC="minipresent.gif" STYLE="position:absolute; left:50"
ondrag="window.event.returnValue = false;"/></DIV>
<DIV STYLE="height:65px; width: 100px; border-bottom:1px solid #cccccc;
padding:10px; cursor:hand"
onclick="fnInsertImage('clover','clover.gif');">
<IMG SRC="miniclover.gif" STYLE="position:absolute; left:50"
ondrag="window.event.returnValue = false;"/></DIV>
</DIV>
<!-- Background Controls -->
<DIV ID="oBackgroundControls" CLASS="rpane" ALIGN="center" STYLE="display:none"
onclick="fnChangeStyle();">
<DIV ALIGN="left" STYLE="font-family:verdana; color:white;
font-size:10pt; padding:1px; font-weight:bold">Background:</DIV>
<DIV ALIGN="left" STYLE="font-family:verdana; color:white; font-size:8pt;
padding:5px">Choose a color or gradient from the styles below.</DIV>
<BR/>
<!-- Solid Swatches -->
<SPAN CLASS="swatch" STYLE="background:black" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:#666666" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:#cccccc" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:white" ></SPAN><BR/>
<SPAN CLASS="swatch" STYLE="background:tomato" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:palegreen" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:palegoldenrod" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:royalblue" ></SPAN><BR/>
<SPAN CLASS="swatch" STYLE="background:pink" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:cornflowerblue" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:blueviolet" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:Darkseagreen" ></SPAN><BR/>
<SPAN CLASS="swatch" STYLE="background:lightskyblue" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:navajowhite" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:yellowgreen" ></SPAN>
<SPAN CLASS="swatch" STYLE="background:palevioletred" ></SPAN><BR/>
<!-- The remaining swatches have a gradient filter applied. -->
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='#99CCFF', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='#99CCFF', gradientType='0');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#99CCFF', startColorstr='#ffffff', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#99CCFF', startColorstr='#ffffff', gradientType='0');">
</SPAN><BR/>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='gold', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='gold', gradientType='0');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='gold', startColorstr='#ffffff', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='gold', startColorstr='#ffffff', gradientType='0');">
</SPAN><BR/>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='palegreen', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='palegreen', gradientType='0');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='palegreen', startColorstr='#ffffff', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='palegreen', startColorstr='#ffffff', gradientType='0');">
</SPAN><BR/>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='red', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='#ffffff', startColorstr='red', gradientType='0');" >
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='red', startColorstr='#ffffff', gradientType='1');">
</SPAN>
<SPAN CLASS="swatch" STYLE="background:lightskyblue;
filter:progid:DXImageTransform.Microsoft.Gradient(
endColorstr='red', startColorstr='#ffffff', gradientType='0');">
</SPAN><BR/>
</DIV>
</SPAN>
<DIV CLASS="bar" >
<A href="http://www.microsoft.com/misc/cpyright.htm" target=_top>
©2001 Microsoft Corporation. All rights reserved. Terms of use.</A>
</DIV>
</body>
</html>
<div style="position: absolute; bottom: 10; right: 0; width: 150; height:
18;cursor:hand;z-index:100000;font:menu;background:infobackground;border:1
solid #999999;padding:4px;">
<A href="/data/" target=_blank><FONT color=red> DataCenter</FONT></A>
<A href="/game/" target=_blank><FONT color=green> 在线小
游戏</FONT></A>
<input type="button" name="Button" value="源代码" onClick=
'window.location = "view-source:" + window.location.href'>
=============================================================================
仿 Office 2003 的工具条
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>仿Office 2003的工具条</title>
<script>
/*----------
舜子制作
Menu Javascript Made by PuterJam
E-mail:puterjam@etang.com
-------------*/
var listnum=0;
var menu_height;
var menu_width;
var menu_left;
var menu_top;
var topMar = 1;
var leftMar = -2;
var space = 1;
var isvisible;
function listbox(listname,buttonname,valuename)
{
this.listname=listname
this.buttonname=buttonname
this.valuename=valuename
}
function listaction(obj,action,showlist,scroll,tw)
{
num=obj.id.charAt(obj.id.length-1)
if (!scroll) {scroll=0}
if (!tw) {tw=105}
listbox=eval(lb[num].listname)
listbutton=eval(lb[num].buttonname)
listvalue=eval(lb[num].valuename)
switch (action)
{
case 0:
listbox.className="getlist";listbutton.className="listover"
break;
case 1:
if (listbox.gf=="0")
{listbox.className="lostlist";listbutton.className="menubar"}
break;
case 2:
for (i=0;i<lb.length;i++)
{
if (num!=i.toString()){
nlistbox=eval(lb[i].listname)
nlistbutton=eval(lb[i].buttonname)
nlistvalue=eval(lb[i].valuename)
nlistbox.className="lostlist";nlistbutton.className="menubar"
nlistbox.gf="0"
}
}
ShowMenu(listbox,showlist,tw,scroll);listbox.className="getlist";listbox.gf="1"
listnum=num;
break;
}
}
function HideMenu()
{
var mX;
var mY;
var vDiv;
var mDiv;
if (isvisible == true)
{
vDiv = document.all("listDiv");
mX = window.event.clientX + document.body.scrollLeft;
mY = window.event.clientY + document.body.scrollTop;
if ((mX < parseInt(vDiv.style.left)) || (mX >
parseInt(vDiv.style.left)+vDiv.offsetWidth) ||
(mY < parseInt(vDiv.style.top)-menu_height) || (mY >
parseInt(vDiv.style.top)+vDiv.offsetHeight)) {
vDiv.style.visibility = "hidden";
isvisible = false;
}
}
if (isvisible==false)
{
for (i=0;i<lb.length;i++)
{
listbox=eval(lb[i].listname)
listbutton=eval(lb[i].buttonname)
listvalue=eval(lb[i].valuename)
listbox.className="lostlist";listbutton.className="menubar"
listbox.gf="0"
}
}
}
function ShowMenu(obj,vMnuCode,tWidth,scroll) {
vMnuCode = "<table id='submenu' cellspacing=0 cellpadding=0
bgcolor=#ffffff border=0 style='width:"+tWidth +
";border-collapse: collapse' class='listDiv'><tr height=23><td
nowrap align=left>" +
vMnuCode + "</td></tr></table>";
menu_height = obj.offsetHeight;
menu_width = obj.offsetWidth;
menu_left = obj.offsetLeft + leftMar+2;
menu_top = obj.offsetTop + topMar + menu_height + space-3;
vParent = obj.offsetParent;
while (vParent.tagName.toUpperCase() != "BODY")
{
menu_left += vParent.offsetLeft;
menu_top += vParent.offsetTop;
vParent = vParent.offsetParent;
}
listDiv.innerHTML = vMnuCode;
listDiv.style.top = menu_top;
listDiv.style.left = menu_left;
if (scroll==0) {listDiv.style.overflow="visible";listDiv.style.width=tWidth}
else {listDiv.style.overflow="scroll";listDiv.style.width=tWidth+18}
listDiv.style.visibility = "visible";
var cssopaction=submenu.filters[0].opacity
submenu.filters[0].opacity=0;
submenu.filters[1].Apply();
submenu.filters[0].opacity=100;
submenu.filters[1].Play();
isvisible = true;
}
function menuitem(lightcolor,normalcolor,icon,title,url)
{
this.lightcolor=lightcolor
this.normalcolor=normalcolor
this.icon=icon
this.title=title
this.url=url
}
function bulidmenu(arrayname)
{
var menuarray=eval(arrayname)
menucontent='<table border="0" width="100%">'
for (i=0;i<menuarray.length;i++)
{
if (menuarray[i].title!="_line")
{
if (menuarray[i].url!="_disable"){css="getitem"}else{css="lostitem"}
if (menuarray[i].icon.length==0)
{
content='<table cellspacing="0" cellpadding="0"><tr><td
style="text-indent:4px"
class="'+css+'">'+menuarray[i].title+'</td></tr></table>'
}
else
{
content='<table cellspacing="0" cellpadding="0"><tr><td width="20"
nowrap><img src="'+menuarray[i].icon+'"></td><td
class="'+css+'">'+menuarray[i].title+'</td></tr></table>'
}
if (menuarray[i].url!="_disable"){
menucontent=menucontent+'<tr><td height=16 style="cursor:default"
onmouseover="style.backgroundColor=\''+ menuarray[i].lightcolor+'\'"
onmouseout="style.backgroundColor=\''+ menuarray[i].normalcolor+'\'"
onclick="Golist(\''+menuarray[i].title+'\')">'+content+'</td></tr>'
}
else
{
menucontent=menucontent+'<tr><td height=16
style="fitler:gray">'+content+'</td></tr>'
}
}
else
{
menucontent=menucontent+'<tr><td height=4><img src="images/dock.gif"
width="99%" height=1></td></tr>'
}
}
menucontent=menucontent+"</table>"
return menucontent
}
function HL_Menu(obj,state)
{
switch (state)
{
case 0:
obj.className="menuover"
break;
case 1:
obj.className="menuup"
break;
}
}
var lb=new Array()
lb[0]=new listbox('listbox0','listbutton0','listvalue0')
lb[1]=new listbox('listbox1','listbutton1','listvalue1')
var list1=new Array()
list1[0]=new menuitem("#B1CBE4","","","ListItem1","")
list1[1]=new menuitem("#B1CBE4","","","ListItem2","")
list1[2]=new menuitem("#B1CBE4","","","ListItem3","")
list1[3]=new menuitem("#B1CBE4","","","ListItem4","")
list1[4]=new menuitem("#B1CBE4","","","ListItem5","")
list1[5]=new menuitem("#B1CBE4","","","ListItem6","")
list1[6]=new menuitem("#B1CBE4","","","ListItem7","")
list1[7]=new menuitem("#B1CBE4","","","ListItem8","")
list1[8]=new menuitem("#B1CBE4","","","ListItem9","")
list1[9]=new menuitem("#B1CBE4","","","ListItem10","")
blist1=bulidmenu("list1")
var list2=new Array()
list2[0]=new menuitem("#B1CBE4","","","字体1","")
list2[1]=new menuitem("#B1CBE4","","","字体2","")
list2[2]=new menuitem("#B1CBE4","","","字体3","")
list2[3]=new menuitem("#B1CBE4","","","字体4","")
list2[4]=new menuitem("#B1CBE4","","","字体5","")
list2[5]=new menuitem("#B1CBE4","","","字体6","")
list2[6]=new menuitem("#B1CBE4","","","字体7","")
list2[7]=new menuitem("#B1CBE4","","","字体8","")
list2[8]=new menuitem("#B1CBE4","","","字体9","")
list2[9]=new menuitem("#B1CBE4","","","字体10","")
blist2=bulidmenu("list2")
function Golist(text)
{
listvalue=eval(lb[listnum].valuename)
listvalue.innerText=text
vDiv = document.all("listDiv");
vDiv.style.visibility = "hidden";
isvisible = false;
}
</script>
<style>
.lostfocus { border: 1px #ffffff solid; background-color: #ffffff;
font-size: 12px; font-family: Arial; }
.getfocus { border: 1px #08246B solid;background-color: #ffffff;
font-family: Arial; font-size: 12px; }
.menubar {filter:progid:DXImageTransform.Microsoft.Gradient(gradienttype=0,
startcolorstr=#F7F7F7, endcolorstr=#DEDBD6)}
.bodybar {filter:progid:DXImageTransform.Microsoft.Gradient(gradienttype=1,
endcolorstr=#F7F7F7, startcolorstr=#DEDBD6)}
.leftitem { font-family: Arial; font-size: 12px; color: #000000; cursor: hand }
.getitem { font-family: Arial; font-size: 12px; color: #000000;
cursor: default }
.lostitem { cursor: default; color: #808080; font-size: 12px;
font-family: Arial; }
.menuup { PADDING-LEFT: 4px; PADDING-RIGHT: 4px; CURSOR: hand;}
.menuover { PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BACKGROUND-COLOR:
#B5BED6; BORDER: 1px solid #08246B; CURSOR: hand; }
.lostlist { border: 1px #ffffff solid; background-color: #ffffff;
font-size: 12px; font-family: Arial; }
.getlist { border: 1px #08246B solid;background-color: #ffffff;
font-family: Arial; font-size: 12px; }
.listover {BACKGROUND-COLOR: #B5BED6; BORDER-left:1px solid #08246B}
.listDiv { filter: alpha(opacity=90,finishopacity=0,style=0)
blendtrans(duration=.3); }
</style>
</head>
<body onclick="HideMenu()" style="margin:0px" bgcolor="999999">
<div id=listDiv style='border:1px #636563 solid;VISIBILITY:
hidden;POSITION: absolute;overflow:scroll;height:150'></div>
<table border="0" width="100%" id="table27" class="bodybar"
cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" height="30">
<tr>
<td><table border="0" cellspacing="0" cellpadding="0" height="22">
<tr>
<td width="5"></td>
<td nowrap align="center" onmouseover="HL_Menu(this,0)"
onmouseout="HL_Menu(this,1)" class="menuup">
<table border="0" cellspacing="0" cellpadding="0"><tr><td
class="leftitem">文件(F)</td></tr></table>
</td>
<td width="5"></td>
<td nowrap align="center" onmouseover="HL_Menu(this,0)"
onmouseout="HL_Menu(this,1)" class="menuup">
<table border="0" cellspacing="0" cellpadding="0"><tr><td
class="leftitem">编辑(E)</td></tr></table>
</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" width="100" id="table28" cellspacing="0"
cellpadding="4" bgcolor="#F7F7F7" style="border-collapse: collapse">
<tr>
<td class="menubar">
<table border="0" width="100%" id="table29" cellspacing="0" cellpadding="0">
<tr>
<td width="10" nowrap>
<table border="0" width="2" cellspacing="0" cellpadding="1" id="table30">
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
</table></td>
<td width="35" nowrap><font size="2">姓名</font></td>
<td width="130" nowrap>
<input type="text" name="T5" size="18" class="lostfocus" gf="0"
onmouseover='this.className="getfocus"' onmouseout='if (this.gf=="0")
this.className="lostfocus"'
onblur='this.className="lostfocus";this.gf="0"'
onfocus='this.className="getfocus";this.gf="1"'></td>
<td width="35" nowrap><font size="2">密码</font></td>
<td width="124" nowrap>
<input type="password" name="T6" size="18" class="lostfocus" gf="0"
onmouseover='this.className="getfocus"' onmouseout='if (this.gf=="0")
this.className="lostfocus"'
onblur='this.className="lostfocus";this.gf="0"'
onfocus='this.className="getfocus";this.gf="1"'></td>
<td width="5" nowrap><img style="border:1px inset" height=14 width=0></td>
<td nowrap align="center" onmouseover="HL_Menu(this,0)"
onmouseout="HL_Menu(this,1)" class="menuup">
<table cellspacing="0" cellpadding="0" id="table31"
width="25"><tr><td nowrap></td><td class="leftitem">
登陆</td></tr></table>
</td>
<td width="100%" nowrap> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" width="100" id="table32" cellspacing="0"
cellpadding="4" bgcolor="#F7F7F7" style="border-collapse: collapse">
<tr>
<td class="menubar">
<table border="0" width="100%" id="table33" cellspacing="0" cellpadding="0">
<tr>
<td width="10" nowrap>
<table border="0" width="2" cellspacing="0" cellpadding="1" id="table34">
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
<tr>
<td><img style="border:1px inset" height=1 width=1></td>
</tr>
</table></td>
<td width="78" nowrap>
<div id="listbox0" class="lostfocus" gf="0"
onmouseover='listaction(this,0)' onmouseout='listaction(this,1)'
onclick='listaction(this,2,blist1,0)' style="cursor:default">
<table border="0" cellpadding="0" cellspacing="0" width="100"
height="18" id="table35">
<tr>
<td valign=center style="text-indent:4px"><font size="2" face="Verdana">
<span id=listvalue0>
</span></font></td>
<td width=12 align="center" class="menubar" id="listbutton0">
<table border="0" cellpadding="0" style="border-collapse: collapse"
id="table36">
<tr height=1>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
</tr>
<tr height=1>
<td></td>
<td bgcolor="#000000"></td>
<td bgcolor="#000000"></td>
<td bgcolor="#000000"></td>
<td></td>
</tr>
<tr height=1>
<td></td>
<td></td>
<td bgcolor="#000000"></td>
<td></td>
<td></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
<td width="78" nowrap>
<div id="listbox1" class="lostfocus" gf="0"
onmouseover='listaction(this,0)' onmouseout='listaction(this,1)'
onclick='listaction(this,2,blist2,1,100)' style="cursor:default">
<table border="0" cellpadding="0" cellspacing="0" width="100"
height="18" id="table37">
<tr>
<td valign=center style="text-indent:4px"><font size="2"
face="Verdana"><span id=listvalue1>
</span></font></td>
<td width=12 align="center" class="menubar" id="listbutton1">
<table border="0" cellpadding="0" style="border-collapse: collapse"
id="table38">
<tr height=1>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
<td width="1" bgcolor="#000000"></td>
</tr>
<tr height=1>
<td></td>
<td bgcolor="#000000"></td>
<td bgcolor="#000000"></td>
<td bgcolor="#000000"></td>
<td></td>
</tr>
<tr height=1>
<td></td>
<td></td>
<td bgcolor="#000000"></td>
<td></td>
<td></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
<td width="4" nowrap>
</td>
<td width="5" nowrap><img style="border:1px inset" height=14 width=0></td>
<td nowrap align="center" onmouseover="HL_Menu(this,0)"
onmouseout="HL_Menu(this,1)" class="menuup">
<table cellspacing="0" cellpadding="0" id="table39"
width="16"><tr><td nowrap></td><td class="leftitem" align=center>
<b>B</b></td></tr></table>
</td>
<td nowrap align="center" onmouseover="HL_Menu(this,0)"
onmouseout="HL_Menu(this,1)" class="menuup">
<table cellspacing="0" cellpadding="0" id="table40"
width="16"><tr><td nowrap></td><td class="leftitem" align=center>
<i>
<b>I</b></i></td></tr></table>
</td>
<td nowrap align="center" onmouseover="HL_Menu(this,0)"
onmouseout="HL_Menu(this,1)" class="menuup">
<table cellspacing="0" cellpadding="0" id="table41"
width="16"><tr><td nowrap></td><td class="leftitem" align=center>
<u>
<b>U</b></u></td></tr></table>
</td>
<td width="100%" nowrap> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table></body>
</html>
===============================================================================
Filters and Transitions Master Sample
<Style>
A {
color: #0080E0;
text-decoration: none;
font-weight: bold;
cursor: help;
filter:progid:dximagetransform.microsoft.pixelate(duration=.7,
maxSquare=22, enabled=false); height: 0px; clip: rect();
}
</style>
<Script defer>
var ar=document.getElementsByTagName('a')
for (var i=0;i<ar.length;i++){
ar[i].onmouseover=function(){this.filters.item(0).apply();this.filters.item(0).play();}
ar[i].onmouseout=function(){this.filters.item(0).apply();this.filters.item(0).play();}
}
</script>
<font color=#0080e0> | <a href=#>test1</a> | <a
href=#>withwolf's blog</a>
</font>
<body style="margin:0px;">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="100%" height="22">
<TABLE height=22 cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD bgColor=#4b92d9></TD>
<TD
style="FILTER:
progid:DXImageTransform.Microsoft.Gradient(startColorStr='#4B92D9',
endColorStr='#CEDFF6', gradientType='1')"
width="50%"></TD>
<TD id=regionGradient2
style="FILTER:
progid:DXImageTransform.Microsoft.Gradient(startColorStr='#CEDFF6',
endColorStr='#1E77D3', gradientType='1')"
width="50%"></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR vAlign=top>
<TD width="100%">
<TABLE height=42 cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR vAlign=top>
<TD width="60" bgcolor="#0a6cce"><img
src="http://www.microsoft.com/library/toolbar/3.0/images/banners/ms_masthead_ltr.gif"></TD>
<TD width="10" bgColor=#0a6cce></TD>
<TD
style="FILTER:
progid:DXImageTransform.Microsoft.Gradient(startColorStr='#0A6CCE',
endColorStr='#FFFFFF', gradientType='1')"
width="507"> </TD>
<TD width="224"><span style="font-family:Verdana;
font-size:10px ">Search Microsoft.com for: </span></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
</body>
================================================================================
单纯使用CSS实现动态提示
<style>
body { font:verdena; font-size:14px; color:#000 }
h1{ font:verdena; font-size:22px; color:#000 }
h2{ font:verdena; font-size:15px; color:#000; text-align:left }
div#main { margin:30 }
/*关键代码开始*/
a.info {
position:relative; z-index:0; background-color:#ccc; color:#000;
text-decoration:none }
a.info:hover {
z-index:1; background-color:#ff0 }
a.info span {
display: none }
a.info:hover span { display:block; position:absolute; top:25px;
left:60px; width:130px; border:1px solid #0cf; background-color:#cff;
color:#000; text-align: center }
/*关键代码结束*/
</style>
<body>
<div id="main">
<h1>单纯使用CSS实现动态提示信息</h1>
<h1>不用js可以实现信息提示效果?!(title和alt除外)</h1>
<h2>By [51js.com]zdzhuo</h2>
<h2>Ie5.5+, Opera7.0, Netscap7.0, Mozilla1.4 都能正常使用</h2>
<br><a class="info" href="javascript:;"><b>这是提示信息</b><span>
www.51js.com</a>不需要js就能实现的提示信息<a class="info"
href="javascript:;"><b>单纯使用CSS实现提示信息</b><span>一个非常简便的方法<br>原理也浅显易懂</span></a><br><br><a
class="info" href="javascript:;"><img
src="http://nb001722.sosoo.net/51js.gif"
border="0"><span>这是我在51js.com的专用头像</span></a><br><br><br>
</div>
</body>
====================================================================================
利用CSS控制打印
<style>
@media print{
INPUT {display:none}
}
</style>
<TABLE border="0" style="font-size:9pt;" width="300px" align="center">
<THEAD style="display:table-header-group;font-weight:bold">
<TR><TD colspan="2" align="center" style="font-weight:bold;border:3px
double red">每页都有的表头</TD></TR>
</THEAD>
<TBODY style="text-align:center"">
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR><TD>表格内容</TD><TD>表格内容</TD></TR>
<TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
</TBODY>
<TFOOT style="display:table-footer-group;font-weight:bold">
<TR>
<TD colspan="2" align="center" style="font-weight:bold;border:3px
double blue">每页都有的表尾</TD>
</TR>
</TFOOT>
</TABLE>
<input type=button value=" 打 印 " onclick="window.print()">
=================================================================================
XP风格菜单
<style>
.xmenu td{font-size:12px;font-family:verdana,arial;font-weight:bolder;color:#ffffff;border:1px
solid #336699;background:#336699;filter:blendtrans(duration=0.5);cursor:hand;text-align:center;}
</style>
<script>
function attachXMenu(objid){
var tds=objid.getElementsByTagName('td');
for(var i=0;i<tds.length;i++){
with(tds[i]){
onmouseover=function(){
with(this){
filters[0].apply();
style.background='#66CCFF';
style.border='1px solid #ffffff';
style.color='black';
filters[0].play();
}
}
onmouseout=function(){
with(this){
filters[0].apply();
style.background='#336699';
style.border='1px solid #336699';
style.color='#ffffff';
filters[0].play();
}
}
}
}
}
</script>
<br>
<table class="xmenu" id="xmenu1" width="100" cellpadding="1"
cellspacing="4" border="0" bgcolor="#336699" align="center">
<tr><td>My
<tr><td>Name
<tr><td>Is
<tr><td onclick="location.href='http://yyhjjk.51.net'">LeX
<tr><td>Rus
<tr><td>!!!
</table>
<script>attachXMenu(xmenu1);</script>
==============================================================================
菜单(menu)
整理的几个菜单,
<style>
/* 先把这个 xmenu 的样式放到css里 */
.xmenu td{font-size:12px;font-family:verdana,arial;font-weight:bolder;color:#ffffff;border:0px
solid #09224c;background:#09224c;filter:blendtrans(duration=0.5);cursor:hand;text-align:center;}
</style>
<script>
<!--
/* 这是把事件动作绑定到菜单上的函数 */
function attachXMenu(objid){
var tds=objid.getElementsByTagName('td');
for(var i=0;i<tds.length;i++){
with(tds[i]){
onmouseover=function(){
with(this){
filters[0].apply();
style.background='#ffffff'; //这是鼠标移上去时的背景颜色
style.border='1px solid #efefef'; //边框
style.color='000000'; //文字颜色
filters[0].play();
}
}
onmouseout=function(){
with(this){
filters[0].apply();
style.background='#09224c'; //这是鼠标离开时的背景颜色
style.border='1px solid #09224c'; //边框如果在大城市生活,每天被生活左右,哪还有什么心情花前月下.
style.color='#ffffff'; //文字颜色
filters[0].play();
}
}
}
}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if
((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
<!--菜单从这里开始, 注意要把class设置成和css里相同的, 还要为它设一个id-->
<table class="xmenu" id="xmenu0" width="500" cellpadding="1"
cellspacing="4" border="0" bgcolor="#09224c" align="center">
<tr>
<td>My</td>
<td>Name</td>
<td>Is</td>
<td onclick="#">LeX <!--这是按下以后打开一个网页--></td>
<td>Rus</td>
<td>!!!</td>
</tr>
</table>
<script>attachXMenu(xmenu0); //在上面这个table结束的地方执行事件动作的绑定,
这里的这个xmenu0就是那个table的id</script>
==================================================================================
经典下推式菜单
<html>
<script>
function show(c_Str)
{if(document.all(c_Str).style.display=='none')
{document.all(c_Str).style.display='block';}
else{document.all(c_Str).style.display='none';}}
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ok</title>
<style>
td
{ cursor: hand;
font-family: Tahoma;
background-color: #336699;
color: #99CCFF;
font-size: 10pt }
li
{ color: #FF0000;
font-family: Tahoma;
background-color: #99CCFF;
font-size: 9pt}
.up{ background-color: #3A6EA5;
border-left: 1 solid #A6C1DF;
border-right: 1 solid #002200;
border-top: 1 solid #A6C1DF;
border-bottom: 1 solid #002200 }
</style>
</head>
<body topmargin="0" leftmargin="5">
<div align="left">
<table border="0" width="48" cellspacing="0" cellpadding="0">
<tr>
<td>
<div onclick=show("a0")>一级菜单</div>
<div id=a0 style="display:none">
<li class=k>01</li>
<li class=k>02</li>
<li class=k>03</li>
</div>
</td>
</tr>
<tr>
<td>
<div onclick=show("a1")>二级菜单</div>
<div id=a1 style="display:none">
<li class=k>11</li>
<li class=k>12</li>
<li class=k>13</li>
</div></td>
</tr>
</table>
</div>
</body>
</html>
=================================================================================
CSS实现的文字竖排
<div style="layout-flow:vertical-ideographic">
说不上为什么<BR>
我变的很主动<BR>
若爱上一个人<BR>
什么都会值得去做<BR>
河边的风在吹着你吹着你的长发<BR>
飘动……<BR>
</div>
<div style="writing-mode=tb-rl;">
<p>这也是竖排的文字!</p>
</div>
=================================================================================
一个渐变的IE Filter效果
<div style="PADDING-RIGHT: 80px; PADDING-BOTTOM:20px;
PADDING-LEFT:80px; PADDING-TOP:10px; FILTER:
progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=100,finishOpacity=5,startX=280,finishX=310,startY=400,finishY=500);
BACKGROUND-COLOR: #CC99FF; position: absolute" ><font
size="80%"><br>这里是文字<br><br><i>阿山Net< /i> - <b>Johnsuna</b><br></div>
Comments