给边框实现单击颜色渐变效果,这并不是单纯的box-shadow属性而已,它的发光是像四周均匀发光,它还包含一个缓慢发光过渡效果.
sdw:focus{
}就可以了.其中的RGB色彩可以根据个人口味进行改变.
如果希望一个网页中所有的文字输入框出现这种效果,只需CSS全局设定即可.
在你的CSS文件中添加这么一句:
input[type=text]:focus,input[type=password]:focus,textarea:focus{}
可以使用 background-image 属性并指定 linear-gradient 函数.
比如想为文本添加从红色到蓝色的渐变色:.text {
background-image: linear-gradient(to right, red, blue);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}另外,还可以使用其他函数,例如 radial-gradient,以创建径向渐变.
希望这可以帮到你.
background: #000000;
background: -moz-linear-gradient(top, #000000 0%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#ffffff));
background: -webkit-linear-gradient(top, #000000 0%,#ffffff 100%);
background: -o-linear-gradient(top, #000000 0%,#ffffff 100%);
background: -ms-linear-gradient(top, #000000 0%,#ffffff 100%);
background: linear-gradient(to bottom, #000000 0%,#ffffff 100%);
以上就是土嘎嘎小编大虾米为大家整理的相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!