CSS实现背景渐变效果

CSS实现背景渐变效果

B组期中项目sample

作品

线性渐变的效果

从橙红色变浅黄色-浅黄色变橙红色

代码


.CenterMe{
	font-family: 'Oswald', sans-serif;
	font-size: 2.5rem;
	text-transform: none;
    height: 350px;
	margin:0px 0px 20px;
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
    background:-webkit-gradient(linear, 0 0, 0 bottom, from(#FA8072), to(rgba(255, 250, 205, 0.8)));  
}  


.other{
	font-family: 'Oswald', sans-serif;
	font-size: 2.5rem;
	text-transform: uppercase;
    height: 400px;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
    background:-webkit-gradient(linear, 0 0, 0 bottom, from(#FFFACD), to(rgba(250, 128, 114, 0.9)));  
}  

参考资料