Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将fixeddiv 居中在没有overflow.
fixed
overflow
我似乎无法让溢出正常工作
如您所见,我不希望整个顶部都是白色的,只是不是的部分inner
inner
有没有办法做到这一点?
如果你想,只有“#inner”是白色的,把你的CSS改成:
#inner { display: inline-block; background-color:white; }
如果您只想 #inner 为黄色,则:
CSS
#inner { background-color:white; } .yellow { background: yellow; }
HTML:
<div id="inner"><span class="yellow" >Loading</span></div>