纯css单个div布局实现水面倒影效果代码
代码语言:html
所属分类:布局界面
代码描述:纯css单个div布局实现水面倒影效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { min-height: 450px; height: 100vh; position: relative; background-color: #191970; text-align: center; } div { width: 100%; height: 100vh; position: absolute; left: 0; bottom: 0; } div:before, div:after { width: 100%; height: 100%; display: block; content: ''; left: 0; bottom: 0; position: absolute; } #reflection { min-height: 450px; background-image: -webkit-gradient(linear, left top, left bottom, from(#191970), color-stop(45%, #87ceeb), color-stop(55%, #87ceeb), to(#191970)); background-image: linear-gradient(to bottom, #191970, #87ceeb 45%, #87ceeb 55%, #191970 100%); overflow: hidden; } #reflection:before { background-repeat: no-repeat; background-image: radial-gradient(ellipse at 0 0, #0b0b31 50%, rgba(25,25,112,0) 50.5%), radial-gradient(ellipse at 100% 0, #0b0b31 50%, rgba(25,25,112,0) 50.5%), radial-gradient(circle at 50% 0, rgba(173,216,230,0.8) 30%, rgba(175,238,238,0.8) 30.5%, rgba(175,238,238,0.8) 40%, rgba(72,209,2.........完整代码请登录后点击上方下载按钮下载查看
网友评论0