background-color实现渐变过渡
css径向渐变
* {margin: 0;padding: 0;
}
.box {max-width: 400px;height: 200px;background: red linear-gradient(to right, rgba(0,255,0,0), rgba(0,255,0,.5));background-size: 200%;transition: background-color .5s;
}.box:hover {background-color: purple;
}
html
<div class="box">
</div>
---------------------------2020/06/02扩展圆形渐变
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta http-equiv="X-UA-Compatible" content="ie=edge" /><title>Document</title><style>* {margin: 0;padding: 0;}.box {width: 300px;height:300px;background: #fff radial-gradient(rgba(0,0,0,.1), green);transition: background-color .5s;}.box:hover {background-color: red;}</style>
</head>
<body><div class="box"></div>
</body>
</html>
--------------------------2020/06/03扩展-背景透明度设置
当背景色需要淡化时的样式设置
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="UTF-8" /><style>.box0{background: #f00;}.box1{background: #f00;opacity: 0.5;}.box2{background: rgba(255,0,0,.5);}</style>
</head>
<body><div class="box0"><h1>我是东,我的背景需要淡一点</h1></div><div class="box1"><h1>用opacity设置透明度时,这里的文字颜色跟着变淡了</h1></div><div class="box2"><h1>用background设置透明度时,这里的文字颜色不变</h1></div></body>
</html>
--------------------------2020/06/03扩展(旋转)-背景网格效果
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>渐变色背景(线性梯度)</title><style>.div2{height: 100px;background: linear-gradient(135deg,transparent 0,transparent 49.5%,red 49.5%,green 50.5%,transparent 50.5%,transparent 100%),linear-gradient(45deg,transparent 0,transparent 49.5%,#024 49.5%,red 50.5%,transparent 50.5%,transparent 100%);background-size: 25px 25px;}</style>
</head>
<body><div class="div2"></div>
</body>
</html>
background-color实现渐变过渡相关推荐
- [css] 如何给文字的color设置渐变
[css] 如何给文字的color设置渐变 .text {background: -webkit-linear-gradient(#eee, #333);-webkit-background-clip ...
- 渐变过渡的相册(shader)
相册是一个大家比较熟悉的场景,一般我们是实现的都是那种跑马灯式的轮播相册,这里异名给大家提供一个利用shader实现图片渐变过渡的相册思路 demo 实现思路 拆分一下功能点,主要有两个:一个是实现图 ...
- 13渐变 过渡 动画 利用多张图片制作动图
13渐变 过渡 动画 利用多张图片制作动图 一.渐变 线性渐变 设置普通渐变background:linear-gradient(颜色1,颜色2)设置渐变比例background:linear-gra ...
- R语言ggplot2在可视化图像中添加横线并在横线中添加文本、为横线中添加的文本添加文本框、自定义文本框的填充色(background color for a text annotation)
R语言ggplot2在可视化图像中添加横线并在横线中添加文本.为横线中添加的文本添加文本框.自定义文本框的填充色(background color for a text annotation) 目录
- R语言ggplot2可视化自定义可视化结果的背景色(background color)实战:改变整个画板(panel)的背景色、改变图像(plot)区域的背景色
R语言ggplot2可视化自定义可视化结果的背景色(background color)实战:改变整个画板(panel)的背景色.改变图像(plot)区域的背景色 目录
- Python使用matplotlib可视化自定义背景色实战:自定义可视化图像的背景色(Background Color)
Python使用matplotlib可视化自定义背景色实战:自定义可视化图像的背景色(Background Color) 目录
- html body background color,HTML Style backgroundColor用法及代码示例
HTML DOM中的backgroundColor属性用于设置或返回元素的背景色. 用法: object.style.backgroundColor 它返回元素的背景色. object.style.b ...
- 文字color颜色渐变(可一直变换) - 代码篇
文字color颜色渐变(可一直变换) - 代码篇 一.应用场景 · 举例: https://www.iconfont.cn/ 站内的 [字体图标][如下图1所示] 某些客户要求的 "炫酷拽& ...
- jQuery获取div的背景颜色 How to get background color of div?
直接代码: <script type="text/javascript"> $(document).ready(function(){$("div" ...
- CSS-0813(重复性)线性/径向渐变-过渡属性transition-变形属性transform变形位移旋转缩放倾斜视域函数perspective变形原点三角形居中方法
title: "CSS 0813-渐变&过渡&变形" date: 2022-08-15T09:43:28+08:00 文章目录 title: "CSS 0 ...
最新文章
- 11月12日云栖精选夜读 | 2135亿!新技术的力量刚刚开始
- python四十九:封装
- verilog基础—规范化参数定义parameter
- std::string 收缩到合适大小_如何选择合适的自动伸缩门尺寸-深圳自动伸缩门供应商...
- 用赫夫曼树进行文件解压
- 天池 在线编程 聪明的销售(计数+贪心)
- android如何调用接口方法,在Android中访问WebService接口的方法
- ldap mysql ubuntu_ubuntu 安装mysql-python和 python-ldap,navicate 问题
- c语言malloc引用类型作参数,c语言中动态内存分配malloc只在堆中分配一片内存.doc...
- Github上关于iOS的各种开源项目集合(强烈建议大家收藏,查看,总有一款你需要)
- 数据挖掘之apriori算法(python实现详细注释)
- oracle查看视图定义语句_oracle中查询用户表/索引/视图创建语句
- 迅雷beat下载为php,2019苹果迅雷beat版链接下载地址-迅雷ios内测版ios13企业信任版app下载官方最新beta手机版-迅雷ios永久稳定版西西软件下载...
- SetLocale和GetLocale函数
- 企业商誉管理系统(业务开展)
- php 母版页,.NET_ASP.NET 2.0 中的创建母版页, 虽然母版页和内容页功能 - phpStudy...
- 决策树剪枝python实现_决策树剪枝问题python代码
- Android Couldn‘t find meta-data for provider with authority
- unbuntu找不到wifi适配器!!!粗暴简单的解决方案
- MySQL 索引基本原则
热门文章
- React使用antd的警告findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Wave
- Installing the Sulley fuzzer framework on Windows XP Professiona
- 论文中文翻译——Vulnerability Dataset Construction Methods Applied To Vulnerability Detection A Survey
- 2004年9月全国计算机等级考试二级C语言笔试试题
- 用户态网络协议栈-OFP-网络框架分享
- php pdf转txt文件,PDF文件在线转换TXT
- 系统集成项目管理工程师高频考点(第九章)
- 武汉星起航跨境—亚马逊新产品上架如何将产品卖出去?
- 一次简单的 HTTP 调用,为什么时延这么大?
- 收集国人不良习惯 -- 有哪些不好的习惯敬请指出,那些不能算作不好的 只能说习俗不同也请指出