1.html标记
body
{
margin
:
0px
;
}
应用:
<
html
><
body
><
form
><
div
></
div
></
form
></
body
></
html
>
2.class
.Search
{
width
:
100%
;
margin
:
0px
;
padding
:
1px
;
font-family
:
Arial, Helvetica, sans-serif
;
text-align
:
center
;
}
应用:
<
div
class
="Search"
>
<
table
width
="100%"
border
="0"
cellspacing
="0"
cellpadding
="0"
>
<
tr
>
<
th
width
="80"
nowrap
><
img
src
="http://images.cnblogs.com/list_10.gif"
width
="24"
height
="24"
align
="absmiddle"
/>
<%
=
GetResourceString(
"
M_SSF_Search_Tag
"
)
%>
:
</
th
>
<
th
width
="200"
><
asp:TextBox
ID
="txtQueryText"
runat
="server"
Width
="200px"
/></
th
>
<
th
align
="left"
><
asp:ImageButton
ID
="btnSearch"
runat
="server"
OnClick
="btnSearch_Click"
/></
th
>
</
tr
>
</
table
>
</
div
>
3.id
#mainCanvas
{
margin
:
0 auto
;
padding
:
0
;
text-align
:
left
;
width
:
964px
;
}
应用:
<
div
id
="mainCanvas"
>
<
div
id
="dBW"
class
="dialogBoxWrapper"
onmousemove
="myMouseMove()"
onmouseup
="myMouseUp()"
>
</
div
>
<
div
id
="dBW2"
class
="dialogBoxWrapper"
onmousemove
="myMouseMove()"
onmouseup
="myMouseUp()"
>
</
div
>
<
div
id
="dBW3"
class
="dialogBoxWrapper"
onmousemove
="myMouseMove()"
onmouseup
="myMouseUp()"
>
</
div
>
</
div
>
4.合并(以逗号分割,标识逗号分割的拥有相同的属性)
body, form, ul, h1, h2, h3, h4, div, h5, h6, p, a, td, button, select
{
font-family
:
宋体, tahoma, verdana, arial
;
margin
:
0
;
padding
:
0
;
z-index
:
1
;
}
应用:
<
html
><
body
><
form
><
div
></
div
></
form
></
body
></
html
>
5.层级(以空格隔开,标识某和层级下的某某)
.Search th input[type="text"]
{
margin
:
0px
;
padding
:
2px
;
background-color
:
#ffffff
;
color
:
#0033CC
;
text-align
:
left
;
border
:
1px solid #0099CC
;
width
:
98%
;
}
应用:
<
div
class
="Search"
>
<
form
id
="form1"
runat
="server"
>
<
table
width
="100%"
border
="0"
cellspacing
="0"
cellpadding
="0"
>
<
tr
>
<
th
width
="80"
nowrap
><
img
src
="http://images.cnblogs.com/list_10.gif"
width
="24"
height
="24"
align
="absmiddle"
/>
<%
=
GetResourceString(
"
M_SSF_Search_Tag
"
)
%>
:
</
th
>
<
th
width
="200"
><
asp:TextBox
ID
="txtQueryText"
runat
="server"
Width
="200px"
/></
th
>
<
th
align
="left"
><
asp:ImageButton
ID
="btnSearch"
runat
="server"
OnClick
="btnSearch_Click"
/></
th
>
</
tr
>
</
table
>
</
form
>
</
div
>