gpt4 book ai didi

jquery - 背景感知文本颜色

转载 作者:技术小花猫 更新时间:2023-10-29 11:12:11 24 4
gpt4 key购买 nike

我有一个响应式网站,它有一个动态大小的背景图像,其中有一些暗区和亮区。在浏览器中,字体颜色被调整为与背景图像的颜色形成鲜明对比。

不幸的是,在响应式(移动)设计中,一些文本叠加在重新调整大小的背景图像的较暗部分之上,并且文本可能很难阅读。有谁知道 jQuery 插件或技术可以让文本了解其背后的背景并相应地更改样式/颜色?

最佳答案

您可以使用文本阴影来标记文本的边缘。

body {
/* your rules */
color: rgba(0 , 0, 0, 0.8 ); /* just a guess that it might be black;*/
text-shadow:
0 0 1px gold,
0 0 3px white; /* choose how many and which colors */
}

就是这个意思

关于jquery - 背景感知文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16926266/

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