gpt4 book ai didi

html - 全宽边框线和透明标志越过

转载 作者:太空宇宙 更新时间:2023-11-03 18:52:54 25 4
gpt4 key购买 nike

我认为最好在此处添加我正在尝试执行的操作的图像。

我需要的是用一条线(对用户来说只是一个视觉上的东西)来分隔标题 div 和内容 div,但同时 Logo 应该正好位于那条线上。

当我将 border-bottom: 5px solid #ff0000; 添加到 header_wrap 时,显然该线在透明 Logo 中变得可见,因此看起来 Logo 被衬里了!这是我遇到的唯一问题。

有什么方法可以满足我的需要吗?

Logo 的背景必须透明,因为页眉和页面正文将以图像作为背景。

提前致谢

the result I need is this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
*
{
margin:0px;
padding:0px;
}

/*** HEADER *************************************************************/

#header_wrap
{
float: left;
width: 100%;
height: 115px;
position:fixed;
top:0;
z-index:1;
border-bottom: 8px solid #e61923;
}
#header_centered_content
{
width: 850px;
height: 115px;
margin: 0 auto 0;
position: relative;
}
#logo
{
width: 229px;
height: 49px;
position: absolute;
left: 0px;
top: 76px;
background-image:url(images/logo-top.png);
}

/*** BODY *************************************************************/

#body_wrap
{
float:left;
width:100%;
height:355px;
margin-top:150px;
}

#body_centered_content
{
width: 850px;
margin: 0 auto 0;
position: relative;
}
</style>
</head>

<body>

<div id="header_wrap">
<div id="header_centered_content">
<div id="logo"></div>
</div>
</div>

<div id="body_wrap">
<div id="body_centered_content">
A lot of TEXT !!!
</div>
</div>


</body>
</html>

最佳答案

或者:

1:用白色背景重新制作logo

2:把logo放在一个白底的容器里,比如另一个div

3:如果你有logo作为div的背景图片,也将背景色设置为白色。

以上所有使用:"background-color: white;"或背景颜色:#ffffff;"

关于html - 全宽边框线和透明标志越过,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14398115/

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