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. redis中的小秘密和持久化小细节

    https://www.jianshu.com/p/36c301ac87df 持久化的情况 https://www.cnblogs.com/wdliu/p/9377278.html 集群搭建 主从  ...

  2. JavaScript代码是怎么执行的?

    前言 众所周知,JavaScript是单线程语言.所以JavaScript是按顺序执行的! 先编译再执行 变量提升 请看下面的例子: console.log(cat) catName("Ch ...

  3. tricks - 实现

    笔记总页面 目录 负下标 动态开点 花括号 负下标 有的时候我们需要存一些负的东西,比如我就只要一个 \(-1\),或者说值域是 \([-10^6,10^6]\),而我懒得写平移 (写平移不仅麻烦,而 ...

  4. luogu p2622

    题目描述 现有n盏灯,以及m个按钮.每个按钮可以同时控制这n盏灯--按下了第i个按钮,对于所有的灯都有一个效果.按下i按钮对于第j盏灯,是下面3中效果之一:如果a[i][j]为1,那么当这盏灯开了的时 ...

  5. JQuery——基本概念

    ###JQuery语法 格式:$(selector).action() 美元符号$本身是JQuery对象的缩写 选择符selector查询和查找HTML元素 Action执行对元素的操作 ###JQu ...

  6. hive启动错误总结

    1,mysql加载的jar包未找到! ......... Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invo ...

  7. PHP基础之与MySQL那些事

    前言 这篇文章会对PHP的MySQL扩展库,MySQLI的扩展库,SQL批量执行,事务控制等等进行一些简单的讲解. MySQL扩展 PHP中MySQL扩展,虽然因为安全的原因,在PHP5.6及往上不在 ...

  8. C++的转换手段并与explicit关键词配合使用

    前言 C中我们会进行各种类型的强制转化,而在C中我们经常可以看到这种转换 memset(OTA_FLAG_ADDRESS,(uint8_t*)&OTA_Flag,sizeof(OTA_Flag ...

  9. CSAPP_BombLab实验报告

    Lab_2实验报告 目录 Lab_2实验报告 屏幕截图 考察内容 各题答案 bomb1 bomb2 bomb3 bomb4 bomb5 bomb6 secret_phase 解题思路 bomb1 bo ...

  10. Codeforces Round #648 (Div. 2) E. Maximum Subsequence Value(鸽巢原理)

    题目链接:https://codeforces.com/problemset/problem/1365/E 题意 有 $n$ 个元素,定义大小为 $k$ 的集合值为 $\sum2^i$,其中,若集合内 ...