gpt4 book ai didi

css - 内部文字阴影,蓝色背景,白色?

转载 作者:行者123 更新时间:2023-11-28 03:10:44 30 4
gpt4 key购买 nike

我有一个带有框阴影的蓝色框,文本颜色为白色,如下所示: screenshot .

是否可以添加内阴影?喜欢this (jsfiddle)?它不适用于白色文本,就像我的示例一样。

body {
/* This has to be same as the text-shadows below */
background: #def;
}

h1 {
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 6em;
line-height: 1em;
}

.inset-text {
/* Shadows are visible under slightly transparent text color */
color: rgba(10, 60, 150, 0.8);
text-shadow: 1px 4px 6px #def, 0 0 0 #000, 1px 4px 6px #def;
}


/* Don't show shadows when selecting text */

::-moz-selection {
background: #5af;
color: #fff;
text-shadow: none;
}

::selection {
background: #5af;
color: #fff;
text-shadow: none;
}
<h1 class="inset-text">Inset text-shadow trick</h1>

最佳答案

能否请您检查一下这是否是您的要求?

body {
/* This has to be same as the text-shadows below */
background: #006db1;
}
h1 {
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 6em;
line-height: 1em;
}
.inset-text {
/* Shadows are visible under slightly transparent text color */
color: rgba(255, 255, 255, 0.8);
text-shadow: 1px 4px 6px #555, 0 0 0 #ddd, 1px 4px 6px #000;
}
/* Don't show shadows when selecting text */
::-moz-selection { background: #fff; color: #000; text-shadow: none; }
::selection { background: #fff; color: #000; text-shadow: none; }

关于css - 内部文字阴影,蓝色背景,白色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45729334/

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