gpt4 book ai didi

css - 我怎样才能拥有 oj-panel 背景宽度为 100% 的元素

转载 作者:太空宇宙 更新时间:2023-11-04 07:35:30 25 4
gpt4 key购买 nike

目前有一个 oj 面板,里面有另一个 oj 面板,但我想要那个,第二个将背景颜色覆盖到第一个的边框... current state of project

当前代码:

<div class="oj-panel" style="border-style: solid; border-color: lightgrey;">
<div class="oj-panel" style="background-color: lightgrey">
<span data-bind="text: oj.Translations.getTranslatedString('application.name')"/>
</div>

example of what I want to implement

oj-panel 是最好的方法吗?如果是这样,我怎样才能将背景覆盖到边界?

最佳答案

移除父级 div 的内边距,子级 div 的边距,并在子级 div 上使用 width: 100%

尝试:

.oj-panel {
padding: 0;
margin: 0;
width: 100%;
}

关于css - 我怎样才能拥有 oj-panel 背景宽度为 100% 的元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48992925/

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