css字体居中是怎么弄的呢?
回答:单行的话设置line-height,多行的话用padding。
div+cssli垂直居中是怎么弄?
复制下面代码去看下,研究下,就会懂啦。
body{
margin:0px0px0px0px;
padding:0px0px0px0px;
font-family:verdana,arial,helvetica,sans-serif;
color:#c060;
background-color:#CCC;
text-align:center;
/*part1of2centeringhack*/
}
#content{
width:400px;
padding:10px;
margin-top:20px;
margin-bottom:20px;
margin-right:auto;
margin-left:auto;
/*operadoesnotlike'margin:20pxauto'*/
background:#FFF;
border:5pxsolid#666;
text-align:left;
/*part2of2centeringhack*/
width:400px;/*ie5winfudgebegins*/
voice-family:"\\"}\\"";
voice-family:inherit;
width:370px;
}
html>body#content{
width:370px;/*ie5winfudgeends*/
}
CSS在IE6下背景图片居中是怎么弄的呢?
这个,可以在cs3里面,直接可以弄好的,点击一下居中的按钮就行了。
CSS图片垂直居中是怎么弄呢?
复制这个代码去看下,就知道啦。
<styletype="text/css">
li{height:60px;}
liimg{height:50px;margin-top:5px;margin-bottom:5px;}
</style>
<liheight=50><imgsrc=http://cache.soso.com/wenwen/i/wenwen_logo.gif/></li>
<li><imgsrc=http://cache.soso.com/wenwen/i/wenwen_logo.gif/></li>
回答:单行的话设置line-height,多行的话用padding。
div+cssli垂直居中是怎么弄?
复制下面代码去看下,研究下,就会懂啦。
body{
margin:0px0px0px0px;
padding:0px0px0px0px;
font-family:verdana,arial,helvetica,sans-serif;
color:#c060;
background-color:#CCC;
text-align:center;
/*part1of2centeringhack*/
}
#content{
width:400px;
padding:10px;
margin-top:20px;
margin-bottom:20px;
margin-right:auto;
margin-left:auto;
/*operadoesnotlike'margin:20pxauto'*/
background:#FFF;
border:5pxsolid#666;
text-align:left;
/*part2of2centeringhack*/
width:400px;/*ie5winfudgebegins*/
voice-family:"\\"}\\"";
voice-family:inherit;
width:370px;
}
html>body#content{
width:370px;/*ie5winfudgeends*/
}
CSS在IE6下背景图片居中是怎么弄的呢?
这个,可以在cs3里面,直接可以弄好的,点击一下居中的按钮就行了。
CSS图片垂直居中是怎么弄呢?
复制这个代码去看下,就知道啦。
<styletype="text/css">
li{height:60px;}
liimg{height:50px;margin-top:5px;margin-bottom:5px;}
</style>
<liheight=50><imgsrc=http://cache.soso.com/wenwen/i/wenwen_logo.gif/></li>
<li><imgsrc=http://cache.soso.com/wenwen/i/wenwen_logo.gif/></li>