在DW里面預覽效果是正確的 用瀏覽器看就不行了 求解答??!
為了驗證下是連接上了CSS試了下顏色
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<link href="/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="top">
?? ?<div class="top_content">
??? <ul>
??????? <li>聯系我們</li>
??????? <li>加入收藏</li>
??????? <li>設為首頁</li>
??? </ul>
?? ?</div>
</div>
</body>
</html>
/* CSS Document */
*{margin:0px;
padding:0px;
?font-size:12px;}
?
?body{background-color:#999;}
?
.top {
?? ?width: 100%;
?? ?height: 27px;
?? ?background: url(/images/top_bg.jpg)? repeat-x;
?? ?float:left;
}
.top_content {
?? ?width: 1000px;
?? ?margin: 0 auto;
?? ?line-height: 27px;
}
.top_content li {
?? ?
?? ?list-style-image: url(/images/arrow.jpg);
?? ?width: 70px;
?? ?float:right
}
2015-07-20
在css中加入
.top_content ul
{
float:left;}
就可以了
2015-02-03
DW不準確 ? 以瀏覽器為準