设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 数据 手机
当前位置: 首页 > 服务器 > 系统 > 正文

CSS3 渐变(Gradients)之CSS3 径向渐变(2)

发布时间:2020-03-15 08:08 所属栏目:52 来源:站长网
导读:pstrong注意:/strongInternetExplorer9及之前的版本不支持渐变。/p /body /html (3)、设置形状 shape 参数定义了形状。它可以是值 circle 或 ellipse。其中,circle 表示圆形,ellipse 表示椭圆形。默认值是 ell

<p><strong>注意:</strong> Internet Explorer 9 及之前的版本不支持渐变。</p>  

</body>  

</html>  

CSS3 渐变(Gradients)之CSS3 径向渐变

(3)、设置形状
 
shape 参数定义了形状。它可以是值 circle 或 ellipse。其中,circle 表示圆形,ellipse 表示椭圆形。默认值是 ellipse。

XML/HTML Code复制内容到剪贴板

<!DOCTYPE html>  

<html>  

<head>  

<style>  

#grad1 {   

    height: 100px;   

    width: 200px;   

    background: -webkit-radial-gradient(red, yellow, green); /* Safari 5.1 - 6.0 */   

    background: -o-radial-gradient(red, yellow, green); /* Opera 11.6 - 12.0 */   

    background: -moz-radial-gradient(red, yellow, green); /* Firefox 3.6 - 15 */   

    background: radial-gradient(red, yellow, green); /* 标准的语法(必须放在最后) */   

}   

#grad2 {   

    height: 100px;   

    width: 200px;   

    background: -webkit-radial-gradient(circle, red, yellow, green); /* Safari 5.1 - 6.0 */   

    background: -o-radial-gradient(circle, red, yellow, green); /* Opera 11.6 - 12.0 */   

    background: -moz-radial-gradient(circle, red, yellow, green); /* Firefox 3.6 - 15 */   

    background: radial-gradient(circle, red, yellow, green); /* 标准的语法(必须放在最后) */   

}   

</style>  

</head>  

<body>  

    

<h3>径向渐变 - 形状</h3>  

<p><strong>椭圆形 Ellipse(默认):</strong></p>  

<div id="grad1"></div>  

<p><strong>圆形 Circle:</strong></p>  

<div id="grad2"></div>  

<p><strong>注意:</strong> Internet Explorer 9 及之前的版本不支持渐变。</p>  

</body>  

</html>  

CSS3 渐变(Gradients)之CSS3 径向渐变

(编辑:ASP站长网)

网友评论
推荐文章
    热点阅读