• 背景渐变


    线性渐变

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>线性渐变</title>
    		<style type="text/css">
    			.all {
    				 100px;
    				height: 100px;
    				border: 1px solid black;
    				margin: 20px auto;
    			}
    
    			#one {
    				background-image: linear-gradient(red, yellow, blue);
    			}
    
    			#two {
    				background-image: linear-gradient(to right, red, yellow, blue);
    			}
    
    			#three {
    				background-image: linear-gradient(to left bottom, red, yellow, blue);
    			}
    
    			#four {
    				background-image: linear-gradient(200deg, red, yellow, blue);
    			}
    
    			#five {
    				background-image: linear-gradient(-200deg, red, yellow, blue);
    			}
    		</style>
    	</head>
    	<body>
    		<div class="all" id="one"></div>
    		<div class="all" id="two"></div>
    		<div class="all" id="three"></div>
    		<div class="all" id="four"></div>
    		<div class="all" id="five"></div>
    	</body>
    </html>
    
    

    径向渐变

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>径向渐变</title>
    		<style type="text/css">
    			.all {
    				 150px;
    				height: 150px;
    				border: 1px solid #000000;
    				margin: 10px auto;
    			}
    
    			#one {
    				background-image: radial-gradient(ellipse, red, yellow, blue);
    			}
    
    			#two {
    				/* 颜色结点不均匀分布: */
    				background-image: radial-gradient(red 20%, yellow 50%, blue 70%);
    			}
    
    			#three {
    				background-image: radial-gradient(circle, red, yellow, blue);
    			}
    
    			#four {
    				background-image: radial-gradient(closest-side at 60% 55%, red, yellow, blue)
    			}
    		</style>
    	</head>
    	<body>
    		<div class="all" id="one"></div>
    		<div class="all" id="two"></div>
    		<div class="all" id="three"></div>
    		<div class="all" id="four"></div>
    	</body>
    </html>
    
    
  • 相关阅读:
    Python shutil模块
    configparser模块来生成和修改配置文件
    用random模块实现验证码
    python 正则re模块
    python 装饰器
    python迭代器和生成器
    python替换一个文件里面的特定内容
    广告资源收集
    Java 语言中 Enum 类型的使用介绍
    FreeMarker + xml 导出word
  • 原文地址:https://www.cnblogs.com/laowenBlog/p/12618234.html
Copyright © 2020-2023  润新知