html中怎么设置渐变颜色设置,css中渐变色怎么设置

您所在的位置:网站首页 渐变色背景怎么弄 html中怎么设置渐变颜色设置,css中渐变色怎么设置

html中怎么设置渐变颜色设置,css中渐变色怎么设置

2024-03-03 12:51| 来源: 网络整理| 查看: 265

这篇文章主要介绍了css3编写浏览器背景渐变背景色的方法,现在分享给大家,也给大家做个参考。

5df45d2de7ce2747.jpg

css中渐变色怎么设置

css 给网页中的背景设置渐变色,css的渐变颜色可以指定固定的两个颜色之间的线性过渡,这个css3属性只支持高版本的浏览器。//浏览器前缀

background: linear-gradient(red, blue);

background: -webkit-linear-gradient(red, blue);

background: -o-linear-gradient(red, blue);

background: -moz-linear-gradient(red, blue);

1、to top :颜色从下往上渐变:

(相关课程推荐:css视频教程)background:-webkit-linear-gradient(to top, red, blue);

background:linear-gradient(to top,red,blue);

2、to bottom :颜色从上往下渐变:background:-webkit-linear-gradient(to bottom, red, blue);

background:linear-gradient(to bottom,red,blue);

3、to left :颜色从右往左渐变:background:-webkit-linear-gradient(to left, red, blue);

background:linear-gradient(to left,red,blue);

4、to right :颜色从左往右渐变background:-webkit-linear-gradient(to right, red, blue);

background:linear-gradient(to right,red,blue);

5、to right :颜色从左往右渐变background:-webkit-linear-gradient(to right, red, blue);

background:linear-gradient(to right,red,blue);

6、to bototm right :颜色从左上角度到右下角渐变background:-webkit-linear-gradient(to right, red, blue);

background:linear-gradient(to right,red,blue);

7、to top left :颜色从右下角度到左上角渐变background:-webkit-linear-gradient(to right, red, blue);

background:linear-gradient(to right,red,blue);

本文来自css3答疑栏目,欢迎学习!



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3