怎么<p>里面內容不自動換行,已經設置過了max-width屬性了
就是照著老師講的內容敲的
@charset "utf-8";
/* CSS Document */
body{
margin:0;
padding:0;
??
}
nav{
background:#CCC;
height:50px;
}
#banner{
background:#777;
height:700px;
}
nav ul{
list-style:none;
margin:0;
height:50PX;
}
nav ul li{
display:inline-block;
line-height:50px;
float:right;
margin-right:20px;
}
nav ul li a{
line-height:inherit;
? ? text-decoration:none;
height:inherit;
display:inline-block;
}
nav ul li.logo{
float:left;
}
#banner .inner{
max-width:300px;
text-align:center;
margin:0 auto;
position:relative;
top:150px;
}
#banner .inner h1{
margin:0;
}
button{
border:none;
background:#3F0;
color:#009;
padding:10px;
?
}
#banner .inner .more{
margin-top:320px;
}
#banner .inner p{
line-height:30px;
}
2022-03-29
2018-07-27
0-0 你那設置#banner .inner{}是設置的父元素啊 你在 最下面的p再設置個值試試 width設置百分比也行