gpt4 book ai didi

css - 尝试使用渐变使标题颜色的中心接近白色

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

我正在尝试用 css 做渐变,但我没有成功。

我的页眉中心有一个紫色 Logo ,我喜欢看到紫色和白色,但我不希望我的整个页眉都是白色的。

所以我试着让我的标题变成蓝色,在我有我的标志的中心我想要一个渐变,让我有更白的中心,所以我可以把我的标志放在那里。

我想要这样的东西:

蓝色和中心我想放我的标志我想有白色背景之类的东西。

enter image description here

我正在尝试实现这种效果,但没有得到我想要的结果。

你可以在这里看到我得到了什么:http://jsfiddle.net/BA9Ry/2/

我的 html:

<header id="top">
<span id="logo">
<img src="http://i62.tinypic.com/11ls8li.png" />
</span>
</header>

CSS:

*
{
margin:0;
padding:0;
border:0;
outline:none;

}

#top
{
width:800;
height:auto;
margin:0 auto 0 auto;
background:#7088A8;
background: -webkit-gradient(linear, left center, right center, from(#7088A8), to(#fff));
}

#logo img {
width:200px;
height:100px;
display:block;
margin:0 auto;
}

最佳答案

使用这个语法: 背景:-webkit-radial-gradient(#FFF, #7088A8);

关于css - 尝试使用渐变使标题颜色的中心接近白色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24621455/

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