CSS常用代码
// 按字符换行
style="word-break: break-all;"
// 按词组换行
style="word-wrap: break-word;"
==========================================================================
==========================================================================
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
text-align:center;
color: #666;
height:100%;
background: url(../images/login/l3.jpg) no-repeat;
vertical-align:middle
display:inline;
zoom:0.75;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src="images/CitationMap /xyzsd_bg.png")
overflow: hidden;
float: left;
white-space: nowrap;
z-index:100;
cursor: pointer;
clear:both;
list-style: none;
background-color: #FFFFFF;
background-image:url(../images/login/l3.jpg);
border-collapse: collapse;
visibility:hidden;
overflow-x: hidden;
==========================================================================
==========================================================================
相关文档:
css控制位置:
纯数字
el.style.posLeft = 0;
el.style.posTop = 0;
数字+单位
el.style.left = "0px";
el.style.top = "0px";
css控制元素的样式:
document.getElementById("para").style.fontWeight ="bold";
或(其他也是这样):
document.getElementById("para").className ="strong"; ......
<html>
<body>
<table class="t FCK__ShowTableBorders" cellspacing="0" cellpadding="8" width="600" border="0">
<tbody>
<tr>
&n ......
overflow从字面意义上来讲就是溢出的意思,换句话说,你有个层,但是里面的内容,图片或者文字要比层大,overflow就是针对这种情况进行处理的。
包含4个属性值,visible,hidden,auto,scroll
visible就是超出的内容仍然正常被显示出来。
hidden就是超出的内容被隐藏。 &nbs ......
ie6中div的高度自动设置,到了ie7和ie8就不行了,需要设置css
/*针对非IE*/
div:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}
/*针对IE*/
div{zoom:1;} ......
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#wai{
width:500px;
height:500px;
background-color: #990;
}
#nei {
float:left;
width:200p ......