1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > 线性渐变 径向渐变 重复性渐变

线性渐变 径向渐变 重复性渐变

时间:2020-01-10 20:42:54

相关推荐

线性渐变 径向渐变 重复性渐变

线性渐变,径向渐变,重复性渐变

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>线性渐变,径向渐变,重复性渐变</title><style type="text/css">.content{clear: both;}.fleft{float:left;}.line{background-image: linear-gradient(0deg,red 50px,yellow 100px,green 200px);width: 200px;height: 200px;border:1px solid black;}.circle1{background-image: -webkit-radial-gradient(circle at top,red,green,yellow);background-image: -ms-radial-gradient(circle at top,red,green,yellow);background-image: -o-radial-gradient(circle at top,red,green,yellow);background-image: radial-gradient(circle at top,red, green,yellow);width: 200px;height: 200px;border-radius: 50%;border:1px solid black;}.circle2{background-image: -webkit-radial-gradient(20px circle at top,red,green,yellow);background-image: -ms-radial-gradient(20px circle at top,red,green,yellow);background-image: -o-radial-gradient(20px circle at top,red,green,yellow);background-image: radial-gradient(20px circle at top,red, green,yellow);width: 200px;height: 200px;border-radius: 50%;border:1px solid black;}.ellipse{background-image: -webkit-radial-gradient(30px 40px ellipse at center,red,green,yellow);background-image: -ms-radial-gradient(30px 40px ellipse at center,red,green,yellow);background-image: -o-radial-gradient(30px 40px ellipse at center,red,green,yellow);background-image: radial-gradient(30px 40px ellipse at center,red, green,yellow);width: 200px;height: 200px;border-radius: 50%;border:1px solid black;}.repeat-liner{background-image: repeating-linear-gradient(to bottom ,red 0px,yellow 40px,green 80px);width: 200px;height: 200px;border:1px solid black;}</style></head><body><div class="content"><div class="line fleft"></div><div class="circle1 fleft"></div><div class="circle2 fleft"></div><div class="ellipse fleft"></div><div class="repeat-liner fleft"></div></div></body></html><!-- 径向渐变分两种类型,圆形和椭圆形-->

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。