700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > html径向渐变的网页 径向渐变.html

html径向渐变的网页 径向渐变.html

时间:2021-07-31 07:08:16

相关推荐

html径向渐变的网页 径向渐变.html

Title

div{

width: 300px;

height: 200px;

/*添加径向渐变:产生也是图像*/

/* radial-gradient(形状 大小 定位,颜色,颜色。。。。。)*/

/*background: radial-gradient(red,blue);*/

/*语法:radial-gradient(形状 大小 坐标,颜色1,颜色2...):

形状shape:circle:产生正方形的渐变色 ellipse:适配当前的形状,如果是正方形的容器,两者效果一样.如果宽高不一样,默认效果切换到ellipse

at position:坐标,默认在正中心。可以赋值坐标(参照元素的左上角),也可以赋值关键字(left center right top bottom)

大小size: closest-side:最近边; farthest-side:最远边; closest-corner:最近角; farthest-corner:最远角。默认是最远的角farthest-corner*/

/*background: radial-gradient(circle,red,blue);*/

/*background: radial-gradient(circle farthest-side at 50px 50px,red,blue);*/

/*background: radial-gradient(at left top,red,blue);*/

/*设置颜色的位置*/

/* background: radial-gradient(red,red 50%,blue 50%,blue);*/

/*background: radial-gradient(形状 大小 定位,blue,red);*/

/* background-position:center center & 20px 30px & 40% 50% */

background: radial-gradient(circle closest-corner at center center,yellow 80%,pink);

}

一键复制

编辑

Web IDE

原始数据

按行查看

历史

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