gpt4 book ai didi

Css,文本阴影 - 如何让它溢出 div

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

我有一个 div 容器(标题)

div.header {
width: 1024px;
height: 115px;
background-color: black;
}

其中包含一个名为 header_title 的 h1,其中包含一个文本:

#header_title {
font: 80px 'Oxygen', sans-serif;
letter-spacing: -8px;
margin-left: 25px;
text-shadow: 500px 35px 18px white, 300px -50px 30px lightblue;
}

在标题 div 的正下方,我有我的菜单,就像您在我的图片中看到的那样。

如果我设置一个文本阴影,它会超出 div,(第 4 个字母,一个 'g')我能否让它显示并且不被切断?

我尝试了 overflow: visible 和 z-index 解决方案,但它不起作用 =(

谢谢。

enter image description here

header 标记:

 <div class=header>
<h1 id=header_title>Programmazione</h1>
</div> <!-- fine header -->

<div class=menu>
etc......

最佳答案

尝试删除 headerheight 属性,并给它一个大约 15px 的 padding-bottom 作为阴影。这应该可以解决问题。

关于Css,文本阴影 - 如何让它溢出 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10366342/

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