<h2> 520 慕女神喊你來表白</h2><p>活動時間:5月20日-5月25日<br>獲獎公布時間:5月26日<br>Learn More>></p>
2017-12-26
老師這個方法挺簡單的,如果不想倒過來可以用flex布局。
.top_content ul{
list-style-image: url(../images/li_bg.gif);
display: flex;
justify-content: flex-end;
line-height: 27px;
}
.top_content li{
width: 70px;
}
.top_content ul{
list-style-image: url(../images/li_bg.gif);
display: flex;
justify-content: flex-end;
line-height: 27px;
}
.top_content li{
width: 70px;
}
2017-12-25
.box_mid li{float:left;list-style-type:none;width:50px;font-size:16px;text-align:center;}
.box_mid a:link, .box_mid a:visited{color:black;display:block;text-decoration: none;}
.box_mid a:hover, .box_mid a:active{display:block;background-color:#900;text-decoration: none;overflow:hidden;}
設了兩個盒子,大概這樣吧
.box_mid a:link, .box_mid a:visited{color:black;display:block;text-decoration: none;}
.box_mid a:hover, .box_mid a:active{display:block;background-color:#900;text-decoration: none;overflow:hidden;}
設了兩個盒子,大概這樣吧
塊元素和內聯元素的基本差異是塊元素一般都從新行開始。而當加入了CSS控制以后,塊元素和內聯元素的這種屬性差異就不成為差異了。我們可以通過設置display屬性實現塊級元素和內聯元素的相互轉變。
.myBox {
width:183px;
height:98px;
border:1px solid red;
padding-left:15px;
margin-top:10px;
}
正確答案,盒子寬度不包含外邊距,但包含內邊距跟邊框
可以用QQ截圖去量一下實際寬度!
width:183px;
height:98px;
border:1px solid red;
padding-left:15px;
margin-top:10px;
}
正確答案,盒子寬度不包含外邊距,但包含內邊距跟邊框
可以用QQ截圖去量一下實際寬度!