CSS 居中
text-align: center;text-decoration: none;background: #EAEBD8;color: #2875DE;font: 16px 宋体,arial;}/*字体*/#sddm div a:hover{ background: #49A3FF;color: #FFF}
意思在text-decoration: none; 前面追加text-align: center;吗?
谢谢veryhunger,请问
-----------
#sddm
{ margin: 0 auto;
パディング: 0;
Zインデックス: 30;
背景色:#F4F4F4;
幅: 100%;
height:23px;}
#sddm li
{ margin: 0;
パディング: 0;
リスト形式: なし。
フロート: 左;
font: bold 16px 宋体}
#sddm li a
{ 表示: ブロック;
余白: 0 1px 0 0;
パディング: 4px 10px;
幅: 100px;/*宽度*/
背景: #5970B2;
カラー:#FFF;
text-align: 中央;
text-decoration: none}
#sddm li a:hover
{background: #49A3FF}
#sddm div
{position: absolute;
可視性: 非表示。
マージン: 0;
/*パディング: 0;*/
背景: #EAEBD8;
border: 1px solid #5970B2}
#sddm div a
{position: relative;
表示: ブロック;
マージン: 0;
パディング: 5px 10px;
幅: 自動;
ホワイトスペース: nowrap;
text-align: 左;
text-align: center;
テキスト装飾: なし。
背景: #EAEBD8;
カラー:#2875DE;
font: 16px 宋体,arial;}/*字体*/
#sddm div a:hover
{background: #49A3FF;
カラー: #FFF}
--------
没有dom構造构不法看
HTML代コード贴出来撒! 一般都は固定宽度居中布局吧。width:500px; マージン:0px 自動; 这个就能居中
没有dom结构没法看
------------------------
代码如下:
番号见楼上、本来は回帰 12530 のものです。