CSS3 & gradient & color & background

css background

https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Images/Using_CSS_gradients

Gradient Background

  1. Linear Gradients (goes down/up/left/right/diagonally)
  2. Radial Gradients (defined by their center)

Linear Gradients


background-image: linear-gradient(direction, color-stop1, color-stop2, ...);

Diagonal 对角线


background-image: linear-gradient(angle, color-stop1, color-stop2);

rainbow

.rainbow {
height: 55px;
background-color: red;
/* For browsers that do not support gradients */
background-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
/* Standard syntax (must be last) */
}

Radial Gradients


background-image: radial-gradient(shape size at position, start-color, ..., last-color);

size keywords

  • closest-side
  • farthest-side
  • closest-corner
  • farthest-corner

https://www.w3schools.com/css/css3_gradients.asp


css gradient generator

https://mycolor.space/gradient

https://cssgradient.io/


gradient text & gradient background

-webkit-text-fill-color & -webkit-gradient

https://wesbos.com/sanitize-html-es6-template-strings/


.post .entry-title {
font-size: 50px;
font-weight: 500;
margin: 20px 0;
border-top: 2px solid #ecd018;
border-bottom: 2px solid #ecd018;
line-height: 1.4;
padding: 20px 0;
background-image: -webkit-gradient(linear,0% 0%,25% 100%,from(#ff2c2c),to(#7a5e91));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

demo

https://www.cnblogs.com/xgqfrms/p/10898414.html



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


CSS3 & gradient & color & background的更多相关文章

  1. CSS3 Gradient 渐变

    转载自:http://www.w3cplus.com/content/css3-gradient CSS3发布很久了,现在在国外的一些页面上常能看到他的身影,这让我羡慕已久,只可惜在国内为了兼容IE, ...

  2. CSS3 Gradient

    CSS3CSS3发布很久了,现在在国外的一些页面上常能看到他的身影,这让我羡慕已久,只可惜在国内为了兼容IE,让这一项技术受到很大的限制,很多Web前端人员都望而止步.虽然如此但还是有很多朋友在钻研C ...

  3. css3 Gradient背景

    css3的gradient分为两种:线性渐变(linear)和径向渐变(radial). 一.线性渐变linear-gradient 1.介绍 linear-gradient([设置方向],[设置开始 ...

  4. 深入理解CSS3 gradient斜向线性渐变——张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=3639 一.问题没有想 ...

  5. CSS3 Gradient渐变效果

    最近看到一遍关于渐变的文章,感觉很好,只是收藏感觉太可惜了,就转载了,好好学习! CSS3 Gradient分为linear-gradient(线性渐变)和radial-gradient(径向渐变). ...

  6. CSS border gradient color All In One

    CSS border gradient color All In One CSS Gradient Borders border-image-source & border-image-sli ...

  7. CSS3 Gradient线性渐变

    废话小说,看代码 <!DOCTYPE html > <html > <head> <meta charset="utf-8"> &l ...

  8. -_-#【CSS3】CSS3 gradient transition with background-position

    CSS3 gradient transition with background-position <!DOCTYPE html> <html> <head> &l ...

  9. CSS3的背景background

    CSS3中的Background属性 background: background-image || background-position/background-size || background ...

随机推荐

  1. Prometheus+Grafana监控SpringBoot

    Prometheus+Grafana监控SpringBoot 一.Prometheus监控SpringBoot 1.1 pom.xml添加依赖 1.2 修改application.yml配置文件 1. ...

  2. Java——接口、匿名类

    接口语法 public interface Demolnteface{ public void demo(): //其他方法 //所有方法都是抽象的 } 接口里放: 1.静态常量 (一般全部大写) 2 ...

  3. Docker安装mysql5.7并且配置主从复制

    Docker安装mysql5.7并且配置主从复制 一.拉取mysql镜像 二.创建文件docker.cnf 2.1 mysql主机(192.168.21.55:3307) 2.1.1 创建文件夹 2. ...

  4. pugixml应用随笔

    1.   修改元素值 second_node.set_value("miller");不对 必须second_node.first_child().set_value(" ...

  5. linux常用命令(shell脚本常用命令)(grep、cut、sort、uniq、seq、tr、basename、dirname)

    本章命令: 1 2 3 4 5 6 grep cut sort uniq seq tr 1.grep 作用:过滤文本内容 选项 描述 -E :--extended--regexp 模式是扩展正则表达式 ...

  6. 说说 JavaScript中 call和apply

    下面有关JavaScript中 call和apply的描述,错误的是? call与apply都属于Function.prototype的一个方法,所以每个function实例都有call.apply属 ...

  7. BZOJ2555 SubString【SAM + Link Cut Tree】

    BZOJ2555. SubString 要求在线询问一个串在原串中出现的次数,并且可以在原串末尾添加字符串 如果没有修改的话,考虑建出\(parent\)树之后统计每个\(endpos\)节点的\(r ...

  8. Educational Codeforces Round 89 (Rated for Div. 2) C. Palindromic Paths(贪心)

    题目链接:https://codeforces.com/contest/1366/problem/C 题意 有一个 $n \times m$ 的 $01$迷宫,要使从 $(1,1)$ 到 $(n,m) ...

  9. Codeforces Round #648 (Div. 2) D. Solve The Maze

    这题犯了一个很严重的错误,bfs 应该在入队操作的同时标记访问,而不是每次只标记取出的队首元素. 题目链接:https://codeforces.com/contest/1365/problem/D ...

  10. 【uva 714】Copying Books(算法效率--二分+贪心)

    题意:将1个含N个正整数的序列划分成K个连续的子序列,使每段的和的最大值尽量小,问字典序最小的划分方案. 解法:由于是连续的数的"最大值最小",便可想到二分每段的最大值,若这时可分 ...