<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css3渐变背景色</title>
</head>
<!-- 背景颜色线性渐变【linear-gradient】
语法:
background:linear-gradient(起点,起点颜色,过度颜色【可选】,终点颜色);
起点:top是从上到下,left是从左到右。如果定义成left top,那就是从左上角到右下角
过渡色:可以插入多个,表示多种颜色的渐变
--> <style> .linear-gradient{
width: 1000px;
margin:0 auto;
text-align: center } .linear-gradient p{
width: 100px;
height: 100px;
float: left;
border:1px #999 solid;
line-height: 100px;
margin-right: 100px;
font-size:20px;
}
.linear-gradient p:first-child{
background:-webkit-linear-gradient(top,#09f,#fff,#0c0);
}
.linear-gradient p:last-child{
background:-webkit-linear-gradient(20deg,#09f,#fff,#0c0);
}
</style>
<body>
<div class="linear-gradient">
<p>普通渐变</p>
<p>角度渐变</p>
</div>
</body>
</html>

最新文章

  1. MySQL 主从复制
  2. Effective C++ 笔记1
  3. 三行代码接入,社交软件打字时底下弹出的表情布局,自定义ViewPager+页面点标+各种功能的android小框架。
  4. jquery-常用的运行函数
  5. Android studio .9图片造成的错误总结
  6. java多线程系类:基础篇:09之interrupt()和线程终止方式
  7. PreparedStatement解决sql注入问题
  8. @RequesParam注解源码解析
  9. JavaScript之arguments对象讲解
  10. 时间序列数据库武斗大会之 KairosDB 篇
  11. [压缩解压缩] SharpZip--压缩、解压缩帮助类
  12. 配置mysql允许远程连接
  13. Redis hash 类型及操作
  14. 什么是deferred对象
  15. Redis-09.慢查询
  16. (整理)SQL Server 2008 CDC 功能使用
  17. Performance面板看js加载
  18. 5分钟教你学会Django系统错误监控
  19. NestedScrollView嵌套ListView时只显示一行的解决方法
  20. [深入Maven源代码]maven绑定命令行参数到具体插件

热门文章

  1. 305. 岛屿数量 II
  2. Vue.js_devtools_5.1.0.zip【需要的可自行下载】
  3. css总结 -使用display:inline-block,出现元素高度错位
  4. 如何成为一名AI工程师
  5. data_analysis 第一课
  6. [USACO12FEB] 附近的牛 Nearby Cows - 树形dp,容斥
  7. Accept Xcode/iOS License to run git
  8. C++——字符串处理
  9. 题解 CF1064A 【Make a triangle!】
  10. 题解【AcWing271】杨老师的照相排列