gpt4 book ai didi

html - 元素不返回其位置 CSS Float

转载 作者:行者123 更新时间:2023-11-28 17:08:21 24 4
gpt4 key购买 nike

发生的事情是 nav-search-ul 元素在更改屏幕分辨率后没有返回到正确的位置,就像媒体不工作一样。

只发生在 chrome 中,因为在 firefox 和 IE 中一切正常

enter image description here

所以你可以签到click

    <nav>
<ul>
<li class="m">aaaaa</li>
<li class="nav-search-ul">bbbbb</li>
</ul>
</nav>

li {
color: red;
display: block;
}

ul {
clear: both;
background: rgb(27, 34, 36);
text-align: center;
}

@media (min-width: 600px) {
li {
display: inline-block;
}
.nav-search-ul {
float: right;
}
}

OK解决方案

http://codepen.io/anon/pen/jPOGZN

最佳答案

只需添加以下 CSS:

.nav-search-ul {
display:inline
}

关于html - 元素不返回其位置 CSS Float,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29810633/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com