纯css打造一个带阴影效果的球体
代码语言:html
所属分类:布局界面
代码描述:纯css打造一个带阴影效果的球体
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> .sphere { z-index: 2; position: absolute; top: 20vw; left: 50vw; width: 30vw; height: 30vw; overflow: hidden; border-radius: 100%; background-color: #666666; background-image: radial-gradient(ellipse 50% 50% at 70% 40%, rgba(26, 26, 26, 0.5), rgba(26, 26, 26, 0)); } .highlight { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(circle at 30% 20%, white, rgba(255, 255, 255, 0) 80%); -webkit-mask-image: radial-gradient(ellipse 55% 50% at 33% 30%, black 90%, rgba(0, 0, 0, 0)); mask-image: radial-gradient(ellipse 55% 50% at 33% 30%, black 90%, rgba(0, 0, 0, 0)); } .shadow { z-index: 1; position: absolute; top: 38vw;.........完整代码请登录后点击上方下载按钮下载查看
网友评论0