下面這個ul不合并到上面的導航欄,研究兩個小時研究不出來,哭了,想把橙色這條合并到紅色里邊


<style>
*{margin: 0;padding: 0;text-decoration: nones;list-style-type:none;}
.header{width: 100%;height:60px;background-color: brown;}
.header a img{background-color: burlywood;margin-top: 5px;}
ul li{
width: 100px;
height: 60px;
background-color: coral;
text-align: center;
line-height: 60px;
float: left;
}
.header a img{display: inline;}
</style>
</head>
<body>
<div class="header">
<a href="https://bbs.csdn.net/justify-content.html"><img src="https://img.uj5u.com/2020/11/23/156002230335303.png" width="200px" height="50px"></a>
<div class="ul">
<ul>
<li class="ss">哈嘍1</li>
<li class="ss">哈嘍2</li>
<li class="ss">哈嘍3</li>
<li class="ss">哈嘍4</li>
<li class="ss">哈嘍5</li>
</ul>
</div>
</div>
uj5u.com熱心網友回復:
滑鼠放到CSDN上面的選單,右鍵點擊檢查,就知道了,或者給ul添加左浮動,或者給header添加display:flexuj5u.com熱心網友回復:
讓ul浮動就可以了轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/226568.html
標籤:HTML(CSS)
