首页 > Web开发 > 详细

Create a Gradual CSS Linear Gradient

时间:2019-10-22 21:19:52      阅读:98      评论:0      收藏:0      [点我收藏+]

Applied Visual Design: Create a Gradual CSS Linear Gradient

background: linear-gradient(gradient_direction, color 1, color 2, color 3, ...)
 
The first argument specifies the direction from which color transition starts - it can be stated as a degree, where 90deg makes a vertical gradient and 45deg is angled like a backslash.
The following arguments specify the order of colors used in the gradient.
 
Example:
background: linear-gradient(90deg, red, yellow, rgb(204, 204, 255));

 

练习代码如下:

<style>
  div {
    border-radius: 20px;
    width: 70%;
    height: 400px;
    margin: 50px auto;
    background: linear-gradient(35deg, #ccffff, #ffcccc);
  }
</style>
<div></div>

 

效果如下:
技术分享图片 
 

Create a Gradual CSS Linear Gradient

原文:https://www.cnblogs.com/jane-panyiyun/p/11722325.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!