注意:行內標簽寬高默認是以內容決定的,無法更改。但是標簽添加浮動以后,可以更改寬高
*{
margin: 0;
padding: 0;
}
/*背景圖平鋪、位置*/
.back{
width: 1000px;
height: 500px;
background-color: red;
background-image: url("ti.jpg");
background-repeat: no-repeat;
background-position: center top;
background-position: 10px 10px;
}
/*body添加背景圖*/
body{
background-image: url("ti.jpg");
background-attachment: fixed;
background-repeat: no-repeat;
}
/*列表前面標*/
ul{
list-style-type: none;
list-style-image: url("ti.jpg");
}
/*表格合并線*/
table{
border: 1px solid blue;
border-collapse: collapse;
}
td{
border: 1px solid orange;
}
.news{
width: 300px;
height: auto;
border: 1px solid red;
margin: auto;
}
.news h1{
height: 48px;
background-color: #e6e6e6;
font-size: 16px;
color: #0066ff;
line-height: 48px;
}
.news ul{
list-style-type: none;
}
.news li{
padding-left: 10px;
line-height: 40px;
border-bottom: 1px dashed darkgrey;
}