如何从CSS中的渐变中消除淡入淡出 [英] How to remove fade from gradient in css

查看:41
本文介绍了如何从CSS中的渐变中消除淡入淡出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的html代码中有以下按钮
<输入类型="button" id ="button"标题="button" name ="button" class ="button" value ="button"/>
并附有此CSS

I have got following button in my html code
<input type="button" id="button" title="button" name="button" class="button" value="button" />
and this css attached

.button{
  width:200px;
  height:;50px;
  position:relative;
  top:50px;
  left:200px;
  background:-webkit-linear-gradient(180deg,white 33%,blue 67%)
}

https://jsfiddle.net/mudkcuqj/

现在,我的灵魂渴望消除由 gradient

Now my spirit desires to remove that heinous fade which is caused by gradient

推荐答案

如果您要删除从蓝色到白色的渐变,并且将其变成蓝色直到某个点,然后更改为白色,开始使用颜色并在同一点结束.

If you're looking to remove the fade from blue to white, and have it be blue up until a point, then change to white, have the colors start and end at the same point.

.button{
  width:200px;
  height:;50px;
  position:relative;
  top:50px;
  left:200px;
  background:-webkit-linear-gradient(180deg,white 33%,blue 33%)
}

<input type="button" id="button" title="button" name="button" class="button" value="button" />

这篇关于如何从CSS中的渐变中消除淡入淡出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆