作者:奋斗的小鸟 | 来源:互联网 | 2023-05-18 01:19
HowdoImakemyh1textagradientfrom#006768to#2E0750.如何使我的h1文本成为#006768到#2E0750的渐变。IuseW
How do I make my h1 text a gradient from #006768 to #2E0750.
如何使我的h1文本成为#006768到#2E0750的渐变。
I use Wordpress.
我使用Wordpress。
I basically want to achieve the following with code:
我基本上想用代码实现以下功能:
http://www.reading-college.ac.uk/sites/default/files/gradient-example.jpg
Can't post an image as lacking enough rep.
无法发布图像缺乏足够的代表。
My site URL is:
我的网站网址是:
http://79.170.44.112/activate-enterprise.co.uk/
I've searched online but can't seem to find a suitable solution?
我在网上搜索但似乎无法找到合适的解决方案?
UPDATE
This is the code I've tried:
这是我试过的代码:
h1.entry-title {
font-size: 72px;
background-image: -webkit-gradient(
linear,
left top,
right top,
color-stop(0.03, rgb(44,7,85)),
color-stop(0.76, rgb(0,103,107))
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
However it's still not showing on my homepage, rather reverting to #2E0750
但是它仍然没有在我的主页上显示,而是回到#2E0750
SECOND UPDATE
Managed to get it work, since I reduced the font size, I had to change the locations accordingly as you couldn't really see the gradient change.
管理得到它的工作,因为我减少了字体大小,我不得不相应地更改位置,因为你无法真正看到渐变变化。
2 个解决方案