最新回答 / 橘夢清荷
可以通過F12查看元素得知,li元素會自帶屬性: text-align:?-webkit-match-parent; 從而繼承父級元素中的text-align為center。只是字體會居中,布局不會居中。ul和li中自帶了一些布局屬性,添加以下屬性可以重置掉。ul,li {????list-style: none;????padding: 0;????margin: 0;}希望幫助到您。
最新回答 / weixin_慕村7171075
沒有看到你的代碼,logo_left 這個類名 說明 要給它 左浮動, float: left;? 你說的一直在頁面的最左邊,可以檢查一下是否有定義它的父盒子。如果沒有 定義父盒子,那么就會以body為父盒子,也就是以頁面為基準(zhǔn)左浮動
2019-07-22
最贊回答 / 慕九州5006391
假如你的css文件名是main.css把這段<link href="main.css" rel="stylesheet" type="text/css">加入head部分
2019-07-19
最新回答 / weixin_慕的地2467121
<...code...><div id="body_content"> ????????&d="div id="body_content_center"&???????????&mg div&"js &f-pimg src="js/mf-pattern/img/loading.gif" alt="內(nèi)容加載中..."/&??&&t;d/div&ass ????????&???div class="pic...
2019-07-18
a:link,a:visited{
text-decoration:none;
color:red;
}
a:hover,a:active{
text-decoration:none;
color:black;
}
text-decoration:none;
color:red;
}
a:hover,a:active{
text-decoration:none;
color:black;
}
2019-07-10
em{
width:20px;
height:16px;
padding-right:5px;
text-align:center;
color:#333;
font-style:normal;
background:url("http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg") no-repeat;
display:block;
float:left;
}
.top em{
background-position:0 -16px;
}
width:20px;
height:16px;
padding-right:5px;
text-align:center;
color:#333;
font-style:normal;
background:url("http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg") no-repeat;
display:block;
float:left;
}
.top em{
background-position:0 -16px;
}
2019-07-10
.topList{
width:500px;
height:500px;
border:1px solid #E8E8E8;
margin:0px auto;
font-size:12px;
}
.topList li{
height:20px;
list-style-type:none;
}
.topList a{
line-height:20px;
}
.top ul{
padding:5px;
list-style-type:none;
}
width:500px;
height:500px;
border:1px solid #E8E8E8;
margin:0px auto;
font-size:12px;
}
.topList li{
height:20px;
list-style-type:none;
}
.topList a{
line-height:20px;
}
.top ul{
padding:5px;
list-style-type:none;
}
2019-07-10
最新回答 / 何同學(xué)學(xué)前端
?text-align:center;color:xx;font-size:xx px; 直接在.myBox{}里面寫。建議去看下初識HTML和CSS那一個課程
2019-07-06